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

[exporter/elasticsearch] Missing Scope.name Field in elasticsearch Exporter with ECS Mapping Mode #34209

Closed
dominicqi opened this issue Jul 23, 2024 · 4 comments
Labels
bug Something isn't working exporter/elasticsearch question Further information is requested

Comments

@dominicqi
Copy link
Contributor

Component(s)

exporter/elasticsearch

What happened?

Description

I'm using the Elasticsearch exporter with mapping.mode: ecs, and I noticed that the Scope.name field is missing from the documents stored in Elasticsearch.

Any help resolving this would be appreciated!

Collector version

v0.103

Environment information

Environment

Kubernetes

OpenTelemetry Collector configuration

mapping:
  mode: ecs

Log output

No response

Additional context

No response

@dominicqi dominicqi added bug Something isn't working needs triage New item requiring triage labels Jul 23, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@carsonip
Copy link
Contributor

Hi @dominicqi , it is expected that Scope.name is ignored in ecs mapping mode. That is consistent with the existing handling of otlp scope attributes in apm-server. In contrast, resource attributes are always stored in the document in ecs mapping mode. Is there a specific reason why you need Scope.name in the resulting ES document?

@dominicqi
Copy link
Contributor Author

Hi @dominicqi , it is expected that Scope.name is ignored in ecs mapping mode. That is consistent with the existing handling of otlp scope attributes in apm-server. In contrast, resource attributes are always stored in the document in ecs mapping mode. Is there a specific reason why you need Scope.name in the resulting ES document?

Hi, Our Application language is Java uses opentelemetry java instrumentation, the Scope.name of Log is Java Logger Name, default is java class name. It is important for Java log.
If there are any other ways to resolve this, please let me know. Thanks!

@dominicqi
Copy link
Contributor Author

Oh, I know , the caller should be put into scope.attr , but the java-agent log4j v1.2 not support capture code attributes。I use transformer copy Scope.name to attribute now , I will close this.

@JaredTan95 JaredTan95 added question Further information is requested and removed needs triage New item requiring triage labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/elasticsearch question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants