Skip to content

Commit

Permalink
[chore] [exporter/coralogix] Docs: Fix example for custom attributes …
Browse files Browse the repository at this point in the history
…with transform processor (#21216)

Fix custom attributes transfrom example

Signed-off-by: Matej Gera <matej.gera@coralogix.com>
  • Loading branch information
matej-g authored May 3, 2023
1 parent 4425c5c commit 546c0da
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions exporter/coralogixexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,13 @@ exporters:

You can combine and create custom Resource attributes using [transform](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor) processor. For example:
```yaml
transform:
logs:
queries:
- set(resource.attributes["applicationName"], Concat("-", "development-environment", resource.attributes["k8s.namespace.name"]))
processors:
transform:
error_mode: ignore
log_statements:
- context: resource
statements:
- set(attributes["applicationName"], Concat(["development-environment", attributes["k8s.namespace.name"]], "-"))
```

Then you can use the custom Resource attribute in Coralogix exporter:
Expand Down

0 comments on commit 546c0da

Please sign in to comment.