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

Add OTLP exporters in our apps that send to the new OT agent #1465

Closed
Tracked by #1456
arealmaas opened this issue Nov 14, 2024 · 0 comments
Closed
Tracked by #1456

Add OTLP exporters in our apps that send to the new OT agent #1465

arealmaas opened this issue Nov 14, 2024 · 0 comments
Assignees
Labels
monitoring Issue related to logging and monitoring

Comments

@arealmaas
Copy link
Collaborator

arealmaas commented Nov 14, 2024

Use the environment variables that are injected in our containers to configure the OTLP endpoints. OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_PROTOCOL

https://learn.microsoft.com/en-us/azure/container-apps/opentelemetry-agents?tabs=arm#environment-variables

For local development, consider adding a OTLP endpoint. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/examples/demo/docker-compose.yaml (this might be a bit crazy for local development, but jaeger is nice to have:))

@arealmaas arealmaas self-assigned this Nov 19, 2024
@arealmaas arealmaas added the monitoring Issue related to logging and monitoring label Nov 19, 2024
@arealmaas arealmaas moved this from Doing to Code Review og PR in Dialogporten / Arbeidsflate - GAMMEL Dec 10, 2024
arealmaas added a commit that referenced this issue Dec 16, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

- Sets up local OTEL setup that match the OTEL configuration in Azure
Container Apps
- Added fusioncache telemetry
- Added Entity Framework telemetry
- Missing liveMetrics if we want that. Needs to be considered. Other
than that, the most relevant traces are pulled out from the AzureMonitor
package.
- Metrics are only visible locally for now. Turns out that the Azure
Monitor Workspace has a Prometheus instance, but it does not allow for
us sending metrics to it, as it does not have an OTEL endpoint 🙃
Solution here was adding the MetricsMonitor to send metrics directly to
app insights for now..!
- Will add logging in the next PR

To see your metrics, spin up the OTEL services by running
`docker-compose-otel.yml`. The service should start sending to the OTLP
collector automatically.

Example of a trace in the local Jaeger:

![CleanShot 2024-12-09 at 17 52
11@2x](https://github.com/user-attachments/assets/295eba27-84e8-4735-9a0e-be4f2fcfed9c)

## Related Issue(s)

- #1465 

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)

---------

Co-authored-by: Ole Jørgen Skogstad <[email protected]>
@arealmaas arealmaas moved this from Code Review og PR to Testing in Dialogporten / Arbeidsflate - GAMMEL Dec 17, 2024
@arealmaas arealmaas moved this from Testing to Done in Dialogporten / Arbeidsflate - GAMMEL Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monitoring Issue related to logging and monitoring
Projects
Development

No branches or pull requests

1 participant