You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In Beats we are using the bodymap mapping mode to control the final document structure for logs. There is one thing we are unable to control with this approach, the final document ID. We use to control this ID for means of deduplicating messages. For context, see https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-deduplication.html.
Describe the solution you'd like
We would like to have a way to tell the exporter to use a specific ID as the document identifier. The current implementation does not allow this and defaults to an autogenerated ID here. This might be a broader question for the collector in general, as we would like such functionality to be available from all the exporters.
Describe alternatives you've considered
One alternative is to consider a specific field in the log message body as the document id. For example in beats we use @metatada._id as the ID field, this @metadata field is then stripped out at our output layer (equivalent to an exporter in OTel) so we can use this information to set the ID properly in the final document.
Looking at the Logs model for OTel this would be equivalent to an Attribute. I imagine deduplication and the ability to set an identifier for the exported data is an interesting functionality that perhaps shoudn't be constrained to the elasticsearchexporter so I'm open to more general suggestions.
Additional context
No response
The text was updated successfully, but these errors were encountered:
mauri870
changed the title
[exporter/elasticsearch] Ability to specify the document ID
[exporter/elasticsearch] Ability to specify the document ID for logs
Dec 18, 2024
Component(s)
exporter/elasticsearch
Is your feature request related to a problem? Please describe.
In Beats we are using the bodymap mapping mode to control the final document structure for logs. There is one thing we are unable to control with this approach, the final document ID. We use to control this ID for means of deduplicating messages. For context, see https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-deduplication.html.
Describe the solution you'd like
We would like to have a way to tell the exporter to use a specific ID as the document identifier. The current implementation does not allow this and defaults to an autogenerated ID here. This might be a broader question for the collector in general, as we would like such functionality to be available from all the exporters.
Describe alternatives you've considered
One alternative is to consider a specific field in the log message body as the document id. For example in beats we use
@metatada._id
as the ID field, this@metadata
field is then stripped out at our output layer (equivalent to an exporter in OTel) so we can use this information to set the ID properly in the final document.Looking at the Logs model for OTel this would be equivalent to an Attribute. I imagine deduplication and the ability to set an identifier for the exported data is an interesting functionality that perhaps shoudn't be constrained to the elasticsearchexporter so I'm open to more general suggestions.
Additional context
No response
The text was updated successfully, but these errors were encountered: