Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CECO-1153] APM e2e test #1549

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

[CECO-1153] APM e2e test #1549

wants to merge 4 commits into from

Conversation

tbavelier
Copy link
Member

What does this PR do?

Introduces an APM e2e test in two parts:

  • Ensuring traces are received locally (at the Agent level) for all 3 services, using all 3 methods (TCP on hostPort, Agent service and UDP using socket)
  • Ensuring traces are sent to the API

Motivation

What inspired you to submit this pull request?

Additional Notes

Some additional nits:

  • WithDevMode should be removed in main branch, it should only be used for dev
  • Some deployments used by tests should be cleaned up after said test
  • Timeout for some tests could probably be reduced

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

Write there any instructions and details you may have to test your PR.

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

@tbavelier tbavelier added this to the v1.12.0 milestone Dec 5, 2024
@tbavelier tbavelier requested a review from a team as a code owner December 5, 2024 09:43
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.94%. Comparing base (87f8143) to head (30643f7).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1549   +/-   ##
=======================================
  Coverage   48.94%   48.94%           
=======================================
  Files         227      227           
  Lines       20636    20636           
=======================================
  Hits        10101    10101           
  Misses      10010    10010           
  Partials      525      525           
Flag Coverage Δ
unittests 48.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87f8143...30643f7. Read the comment docs.

func verifyAPISpans(s *kindSuite, c *assert.CollectT) {
// TODO: check uniqueness of kind.ClusterName per test run
// If not unique, we can also use pod_name to filter spans
spansQuery := fmt.Sprintf("(env:e2e-operator service:e2e-test-apm* kube_cluster_name:%s)", s.Env().Kind.ClusterName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cluster name is not unique across separate tests belonging to a test suite

@@ -367,6 +373,48 @@ func (s *kindSuite) TestKindRun() {

})

s.T().Run("APM (hostPort, local service, UDP) works", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
s.T().Run("APM (hostPort, local service, UDP) works", func(t *testing.T) {
s.T().Run("APM hostPort, local service, UDP works", func(t *testing.T) {

Could we remove parentheses in the test names? That way when you run a specific test using make e2e-test we don't have to add double quotes or escape characters to account for the parentheses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants