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

stats/opentelemetry: Add e2e testing for CSM Observability #7279

Merged
merged 8 commits into from
Jun 10, 2024

Conversation

zasweq
Copy link
Contributor

@zasweq zasweq commented May 29, 2024

This PR adds the e2e testing for CSM Observability. It refactors common logic shared with OpenTelemetry e2e tests into internal/testingutils.

Alongside this, this PR deletes the Target Attribute filter and adds a unit test for the method attribute filter. The target attribute filter used to be part of the OTel API, but was deleted as it was realized it was too much complexity for a use case we don't even know if users want: grpc/proposal#431. The method attribute filter I simply forgot to unit test.

RELEASE NOTES:

  • stats/opentelemetry/csm: Add CSM Observability.

@zasweq zasweq requested a review from dfawley May 29, 2024 23:34
@zasweq zasweq added this to the 1.65 Release milestone May 29, 2024
@zasweq zasweq requested review from easwars and removed request for dfawley May 31, 2024 17:58
@zasweq zasweq assigned easwars and unassigned dfawley May 31, 2024
@easwars easwars assigned zasweq and unassigned easwars May 31, 2024
@zasweq
Copy link
Contributor Author

zasweq commented May 31, 2024

Thanks for the pass! Got to all comments.

@zasweq zasweq assigned easwars and unassigned zasweq May 31, 2024
@easwars
Copy link
Contributor

easwars commented May 31, 2024

Alongside this, this PR deletes the Target Attribute filter and adds a unit test for the method attribute filter.

Why are we doing this?

@zasweq
Copy link
Contributor Author

zasweq commented May 31, 2024

The target attribute filter used to part of the OTel API, but was deleted as it was realized it was too much complexity: grpc/proposal#431. The method attribute filter I simply forgot to unit test.

stats/opentelemetry/e2e_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/e2e_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/e2e_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/e2e_test.go Show resolved Hide resolved
stats/opentelemetry/e2e_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/e2e_test.go Show resolved Hide resolved
stats/opentelemetry/e2e_test.go Show resolved Hide resolved
stats/opentelemetry/internal/testutils/testutils.go Outdated Show resolved Hide resolved
stats/opentelemetry/internal/testutils/testutils.go Outdated Show resolved Hide resolved
@easwars
Copy link
Contributor

easwars commented May 31, 2024

The target attribute filter used to part of the OTel API, but was deleted as it was realized it was too much complexity: grpc/proposal#431. The method attribute filter I simply forgot to unit test.

Please specify in the PR description.

@easwars easwars assigned zasweq and unassigned easwars May 31, 2024
@zasweq
Copy link
Contributor Author

zasweq commented Jun 3, 2024

Thank you for the detailed pass!

@zasweq zasweq assigned easwars and unassigned zasweq Jun 3, 2024
stats/opentelemetry/e2e_test.go Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/internal/testutils/testutils.go Outdated Show resolved Hide resolved
stats/opentelemetry/internal/testutils/testutils.go Outdated Show resolved Hide resolved
stats/opentelemetry/internal/testutils/testutils.go Outdated Show resolved Hide resolved
stats/opentelemetry/e2e_test.go Show resolved Hide resolved
@easwars easwars removed their assignment Jun 3, 2024
@zasweq zasweq assigned easwars and unassigned zasweq Jun 6, 2024
@zasweq
Copy link
Contributor Author

zasweq commented Jun 6, 2024

Thank you so much for the detailed pass, looks a lot cleaner now. Got to all comments.

@arvindbr8 arvindbr8 modified the milestones: 1.65 Release, 1.66 Release Jun 6, 2024
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
}
}

func unaryInterceptorAttachxDSLabels(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Super nit: s/xDS/XDS/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, missed this one.

stats/opentelemetry/csm/observability_test.go Outdated Show resolved Hide resolved
stats/opentelemetry/csm/observability_test.go Show resolved Hide resolved
stats/opentelemetry/internal/testutils/testutils.go Outdated Show resolved Hide resolved
stats/opentelemetry/internal/testutils/testutils.go Outdated Show resolved Hide resolved
@easwars easwars assigned zasweq and unassigned easwars Jun 7, 2024
@zasweq zasweq assigned easwars and unassigned zasweq Jun 10, 2024
@easwars easwars assigned zasweq and unassigned easwars Jun 10, 2024
@zasweq
Copy link
Contributor Author

zasweq commented Jun 10, 2024

Thank you for the detailed passes on this; this looks much better than when it started.

@zasweq zasweq merged commit 3267089 into grpc:master Jun 10, 2024
11 checks passed
zasweq added a commit to zasweq/grpc-go that referenced this pull request Jun 10, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants