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

feat(otelaws): add sns attribute instrumentation #6388

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

pragmaticivan
Copy link
Contributor

@pragmaticivan pragmaticivan commented Dec 2, 2024

Notes:

  • Only the semconv/v1.27.0 was available in the latest published version of the otel module.
  • The current project setup doesn't take into consideration all the various hooks (m.initializeMiddlewareBefore, m.initializeMiddlewareAfter, m.finalizeMiddlewareAfter, m.deserializeMiddleware). All attributes are currently being set on initializeMiddlewareAfter.
  • Ref: https://opentelemetry.io/docs/specs/semconv/attributes-registry/messaging/
  • Added changelog

@pragmaticivan pragmaticivan requested a review from a team as a code owner December 2, 2024 00:20
@github-actions github-actions bot requested a review from akats7 December 2, 2024 00:21
@dmathieu
Copy link
Member

dmathieu commented Dec 2, 2024

This will need a changelog entry.

@pragmaticivan pragmaticivan force-pushed the instrument-aws-sns-go-v2 branch from 091283b to c8def81 Compare December 2, 2024 14:56
@pragmaticivan
Copy link
Contributor Author

Thanks @dmathieu !

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 67.8%. Comparing base (3af31bd) to head (bcc3a92).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...hub.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go 88.0% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6388   +/-   ##
=====================================
  Coverage   67.7%   67.8%           
=====================================
  Files        199     200    +1     
  Lines      16564   16589   +25     
=====================================
+ Hits       11229   11251   +22     
- Misses      4993    4995    +2     
- Partials     342     343    +1     
Files with missing lines Coverage Δ
...github.com/aws/aws-sdk-go-v2/otelaws/attributes.go 82.3% <ø> (ø)
...hub.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go 88.0% <88.0%> (ø)

@pragmaticivan pragmaticivan force-pushed the instrument-aws-sns-go-v2 branch 2 times, most recently from 11d1c29 to 337ad38 Compare December 8, 2024 16:43
@pragmaticivan
Copy link
Contributor Author

Checking what's going with the tests, something odd there after the merge conflict.

feat(otelaws): also instrument PublishBatchInput

doc: add entry to changelog

chore: sns package indirect

Update instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Update instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Update instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

revert - Update CHANGELOG.md

chore: add missin assertions and use context background in tests

chore: add test for input wihtout destination

chore(build): fix conflicts

chore(build): fix conflicts
@pragmaticivan pragmaticivan force-pushed the instrument-aws-sns-go-v2 branch from 337ad38 to ea77683 Compare December 8, 2024 17:42
@pragmaticivan
Copy link
Contributor Author

Screenshot 2024-12-08 at 11 47 10 AM Fixed, no errors at the end.

@MrAlias
Copy link
Contributor

MrAlias commented Dec 10, 2024

@akats7 does this look good to you?

@akats7
Copy link
Contributor

akats7 commented Dec 10, 2024

@akats7 does this look good to you?

yep looks good, meant to approve earlier

@MrAlias MrAlias merged commit a761314 into open-telemetry:main Dec 10, 2024
25 checks passed
@MrAlias MrAlias added this to the v1.33.0 milestone Dec 11, 2024
MrAlias added a commit that referenced this pull request Dec 12, 2024
### Added

- Added support for providing `endpoint`, `pollingIntervalMs` and
`initialSamplingRate` using environment variable
`OTEL_TRACES_SAMPLER_ARG` in
`go.opentelemetry.io/contrib/samples/jaegerremote`. (#6310)
- Added support exporting logs via OTLP over gRPC in
`go.opentelemetry.io/contrib/config`. (#6340)
- The `go.opentelemetry.io/contrib/bridges/otellogr` module.
This module provides an OpenTelemetry logging bridge for
`github.com/go-logr/logr`. (#6386)
- Added SNS instrumentation in
`go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`.
(#6388)

### Changed

- Change the span name to be `GET /path` so it complies with the OTel
HTTP semantic conventions in
`go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho`.
(#6365)
- Record errors instead of setting the `gin.errors` attribute in
`go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`.
(#6346)
- The `go.opentelemetry.io/contrib/config` now supports multiple schemas
in subdirectories (i.e. `go.opentelemetry.io/contrib/config/v0.3.0`) for
easier migration. (#6412)

### Fixed

- Fix broken AWS presigned URLs when using instrumentation in
`go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`.
(#5975)
- Fixed the value for configuring the OTLP exporter to use `grpc`
instead of `grpc/protobuf` in `go.opentelemetry.io/contrib/config`.
(#6338)
- Allow marshaling types in `go.opentelemetry.io/contrib/config`.
(#6347)
- Removed the redundant handling of panic from the `HTML` function in
`go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`.
(#6373)
- The `code.function` attribute emitted by
`go.opentelemetry.io/contrib/bridges/otelslog` now stores just the
function name instead the package path-qualified function name. The
`code.namespace` attribute now stores the package path. (#6415)
- The `code.function` attribute emitted by
`go.opentelemetry.io/contrib/bridges/otelzap` now stores just the
function name instead the package path-qualified function name. The
`code.namespace` attribute now stores the package path. (#6423)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants