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(loggroupgenerator): add otel #124

Merged
merged 1 commit into from
Dec 6, 2023
Merged

feat(loggroupgenerator): add otel #124

merged 1 commit into from
Dec 6, 2023

Conversation

jta
Copy link
Contributor

@jta jta commented Dec 6, 2023

This commit introduces the necessary OTEL instrumentation to our utility script. This is an absolutely insane amounts of dependencies (dynamodb?!) and boilerplate. The one nice thing is, as currently coded, all configuration can be done via env vars, e.g:

export OTEL_SERVICE_NAME=loggroupgenerator
export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_ENDPOINT=https://157675308050.collect.observe-eng.com/v1/otel
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <token>"

This means we can very easily export to stdout as well:

export OTEL_TRACES_EXPORTER=console

This commit introduces the necessary OTEL instrumentation to our utility
script. This is an absolutely insane amounts of dependencies
(dynamodb?!) and boilerplate. The one nice thing is, as currently coded,
all configuration can be done via env vars, e.g:

```
export OTEL_SERVICE_NAME=loggroupgenerator
export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_ENDPOINT=https://157675308050.collect.observe-eng.com/v1/otel
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <token>"
```

This means we can very easily export to stdout as well:
```
export OTEL_TRACES_EXPORTER=console
```
@obs-gh-colinhutchinson
Copy link
Contributor

image
😱

Copy link
Contributor

@obs-gh-colinhutchinson obs-gh-colinhutchinson left a comment

Choose a reason for hiding this comment

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

main.go looks fine so 👍

@jta
Copy link
Contributor Author

jta commented Dec 6, 2023

main.go looks fine so 👍

i hate it, it pulls in the entire otel ecosystem and then some. awful.

@jta jta merged commit 55d11e3 into main Dec 6, 2023
13 checks passed
@jta jta deleted the joao/loggroupgenerator-otel branch December 6, 2023 04:18
Copy link

github-actions bot commented Dec 6, 2023

🎉 This PR is included in version 1.5.0-beta.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants