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/logicmonitorexporter] Support log resource mapping config #29733

Merged

Conversation

avadhut123pisal
Copy link
Contributor

Description:
This PR adds support for resource mapping config for logs.
To make the resource mapping for logs flexible, LogicMonitor platform expects some params to be present in the log ingestion request. We have changed the exporter configuration to accept that configuration.

Link to tracking Issue: #29732

Testing: Unit test cases were added. Also did the functional testing for the log ingestion with the newly added config.

Documentation:

As per the LogicMonitor's Log Ingestion documentation, if more than one resource property exists, only the first property will be mapped. In case of OTLP logs, there can be multiple resource attributes and its order also cannot be guaranteed.

Recently, the LogicMonitor has made the resource mapping for logs more flexible. With that, any of the resource attributes present in the log matches can be considered for resource mapping. But, this is not the default behaviour. In order to make the resource mapping flexible, you can configure the resource_mapping_op in the LogicMonitor's exporter.

exporters:
   logicmonitor:
    ...
     logs:
       resource_mapping_op: "OR"

The value for resource_mapping_op can be AND or OR. The values are case-insensitive.

@github-actions github-actions bot added the cmd/configschema configschema command label Dec 11, 2023
@avadhut123pisal avadhut123pisal marked this pull request as ready for review December 11, 2023 09:16
@avadhut123pisal avadhut123pisal requested a review from a team December 11, 2023 09:16
Copy link

@khyatigandhi0612 khyatigandhi0612 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@mx-psi mx-psi added the ready to merge Code review completed; ready to merge by maintainers label Dec 12, 2023
@mx-psi mx-psi merged commit 810ab60 into open-telemetry:main Dec 13, 2023
85 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 13, 2023
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this pull request Jan 10, 2024
…pen-telemetry#29733)

**Description:** 
This PR adds support for resource mapping config for logs. 
To make the resource mapping for logs flexible, LogicMonitor platform
expects some params to be present in the log ingestion request. We have
changed the exporter configuration to accept that configuration.

**Link to tracking Issue:** open-telemetry#29732

**Testing:** Unit test cases were added. Also did the functional testing
for the log ingestion with the newly added config.

**Documentation:** 

As per the LogicMonitor's [Log Ingestion
documentation](https://www.logicmonitor.com/support/lm-logs/sending-logs-to-the-lm-logs-ingestion-api),
if more than one resource property exists, only the first property will
be mapped. In case of OTLP logs, there can be multiple resource
attributes and its order also cannot be guaranteed.

Recently, the LogicMonitor has made the resource mapping for logs more
flexible. With that, any of the resource attributes present in the log
matches can be considered for resource mapping. But, this is not the
default behaviour. In order to make the resource mapping flexible, you
can configure the resource_mapping_op in the LogicMonitor's exporter.

 ```
 exporters:
    logicmonitor:
     ...
      logs:
        resource_mapping_op: "OR"
```
The value for resource_mapping_op can be AND or OR. The values are case-insensitive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/configschema configschema command cmd/otelcontribcol otelcontribcol command exporter/logicmonitor ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants