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 resource mapping configurations for logs #29732

Closed
avadhut123pisal opened this issue Dec 11, 2023 · 3 comments
Labels

Comments

@avadhut123pisal
Copy link
Contributor

Component(s)

exporter/logicmonitor

Describe the issue you're reporting

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. To opt for the flexible resource mapping for logs, LogicMonitor platform expects some params to be present in the log ingestion request.

Changes need to be done in the LogicMonitor exporter also in order to get the input of this resource mapping configuration for logs.

Copy link
Contributor

Pinging code owners for exporter/logicmonitor: @bogdandrutu @khyatigandhi6 @avadhut123pisal. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Removing needs triage as it was filed by a code owner and the suggestion makes sense to me.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Dec 11, 2023
mx-psi pushed a commit that referenced this issue Dec 13, 2023
…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:** #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.
@avadhut123pisal
Copy link
Contributor Author

Closing this issue, as pull request has been merged.

cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this issue 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
Projects
None yet
Development

No branches or pull requests

2 participants