Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jupiterone/oteljsonlogflattenerprocessor
https://github.com/jupiterone/oteljsonlogflattenerprocessor
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jupiterone/oteljsonlogflattenerprocessor
- Owner: JupiterOne
- Created: 2023-11-14T16:28:00.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-04-24T20:54:57.000Z (7 months ago)
- Last Synced: 2024-04-24T21:40:27.498Z (7 months ago)
- Language: Go
- Size: 21.5 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# ARCHIVED
This processor is no longer needed as the ottl library added a flatten function that does this and we have implemented this.
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/README.md# OpenTelemetry JSON Log Flattener
NewRelic doesn't support nested JSON attributes in OpenTelemetry logs. To help alleviate these issues, this processor will flatten JSON at the top level. It turns messages like this:
```json
{
"name": "Test User",
"address": {
"street": "First Ave",
"house": 1234
},
"occupants": [
"Test User",
"Test User 2",
"Test User 3"
]
}
```
into
```json
{
"name": "Test User",
"address.street": "First Ave",
"address.house": 1234,
"occupants": "[\"Test User\", \"Test User 2\", \"Test User 3\"]"
}
```## Using this processor
To add this processor to your OpenTelemetry Collector, follow the instructions for building a collector here: https://opentelemetry.io/docs/collector/custom-collector/In your config, add the following:
```yaml
processors:
- github.com/jupiterone/oteljsonlogflattenerprocessor latest
```In your collector config, add the following processor:
```yaml
receivers:
...
exporters:
...
processors:
- jsonlogflattener
pipelines:
logs:
receivers: [...]
processors: [jsonlogflattener]
exporters: [...]
```