Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shuttle-hq/athenametricsencodingextension
An extension to OpenTelemetry Collector for writing metrics in flat JSON format
https://github.com/shuttle-hq/athenametricsencodingextension
open-telemetry opentelemetry
Last synced: about 20 hours ago
JSON representation
An extension to OpenTelemetry Collector for writing metrics in flat JSON format
- Host: GitHub
- URL: https://github.com/shuttle-hq/athenametricsencodingextension
- Owner: shuttle-hq
- License: apache-2.0
- Created: 2025-02-06T11:48:02.000Z (2 days ago)
- Default Branch: main
- Last Pushed: 2025-02-07T13:17:49.000Z (1 day ago)
- Last Synced: 2025-02-07T13:19:13.412Z (1 day ago)
- Topics: open-telemetry, opentelemetry
- Language: Go
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Athena metrics JSON encoding extension
| Status | |
| ------------- |-----------|
| Stability | [alpha] |
| Distributions | [] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fathenametricsencoding%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fathenametricsencoding) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fathenametricsencoding%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fathenametricsencoding) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@sergei-ivanov](https://www.github.com/sergei-ivanov) |[alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha
The `athena_metrics_encoding` extension is an encoding extension that can marshal metrics.
The extension requires no configuration.
When marshaling the metrics, the extension will output JSON lines (one line per resource metric),
separated by a Unix new line (`\n`). Each JSON line will be a flat map of key-value pairs,
where the keys are the names of either attributes or scope metrics, and the values are
their respective values.For example:
```json lines
{"aws.ecs.cluster.name":"production-user-cluster-fargate-1","aws.ecs.task.id":"4b8146f69b564bebadf89b47b904325b","ecs.task.cpu.utilized":9.833394491064633,"ecs.task.memory.utilized":22,"timestamp":1734959017836}
{"aws.ecs.cluster.name":"production-user-cluster-fargate-1","aws.ecs.task.id":"fa83a50c8a2b29b15492f1667e194b74","ecs.task.cpu.utilized":207.4615648942136,"ecs.task.memory.utilized":87,"timestamp":1734959017836}
```When exported to S3 using [S3 exporter][1], the resulting files can be easily ingested by Athena and Glue ETL jobs.
Here is the default configuration:
```yaml
extensions:
athena_metrics_encoding:
```[1]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awss3exporter