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

Support logs resource mapping config #44

Merged
merged 5 commits into from
Dec 8, 2023

Conversation

avadhut123pisal
Copy link
Contributor

@avadhut123pisal avadhut123pisal commented Dec 8, 2023

As per the LogicMonitor's Log Ingestion documentation, if more than one resource property exists, only the first property will be mapped.
Recently to make the resource mapping somewhat flexible, some changes have been made in the Log Ingestion API request payload. With that, any of the resource attributes present in the log matches can be considered for resource mapping.

With that, a new attribute has to be set in the request payload to make the resource mapping operation as OR instead of default AND.

For example:

[
    {
        "message": "user john logged out",
        "timestamp": 1701947967,
        "_lm.resourceId": {
            "system.hostname": "auth"
        },
        "_op": "OR"
    }
]

To use that, log ingestion api client must be created with WithResourceMappingOperation("OR") option.

@avadhut123pisal avadhut123pisal self-assigned this Dec 8, 2023
@avadhut123pisal avadhut123pisal added the enhancement New feature or request label Dec 8, 2023
@avadhut123pisal avadhut123pisal merged commit 5ae835e into main Dec 8, 2023
3 checks passed
TylerHelmuth referenced this pull request in open-telemetry/opentelemetry-collector-contrib Dec 12, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/logicmonitor/lm-data-sdk-go](https://togithub.com/logicmonitor/lm-data-sdk-go)
| require | minor | `v1.0.0` -> `v1.1.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>logicmonitor/lm-data-sdk-go
(github.com/logicmonitor/lm-data-sdk-go)</summary>

###
[`v1.1.0`](https://togithub.com/logicmonitor/lm-data-sdk-go/releases/tag/v1.1.0)

[Compare
Source](https://togithub.com/logicmonitor/lm-data-sdk-go/compare/v1.0.0...v1.1.0)

#### What's Changed

- improvement(pinned dependency): Add third party hash to Github Actions
by [@&#8203;anubhav6663](https://togithub.com/anubhav6663) in
[https://github.com/logicmonitor/lm-data-sdk-go/pull/33](https://togithub.com/logicmonitor/lm-data-sdk-go/pull/33)
- Bump go.opentelemetry.io/collector/pdata from 1.0.0-rc6 to 1.0.0-rc8
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/logicmonitor/lm-data-sdk-go/pull/32](https://togithub.com/logicmonitor/lm-data-sdk-go/pull/32)
- feature(sbom): Add sbom report. by
[@&#8203;anubhav6663](https://togithub.com/anubhav6663) in
[https://github.com/logicmonitor/lm-data-sdk-go/pull/34](https://togithub.com/logicmonitor/lm-data-sdk-go/pull/34)
- Bump go.opentelemetry.io/collector/pdata from 1.0.0-rc8 to 1.0.0-rc9
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/logicmonitor/lm-data-sdk-go/pull/36](https://togithub.com/logicmonitor/lm-data-sdk-go/pull/36)
- Bump go.uber.org/multierr from 1.10.0 to 1.11.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/logicmonitor/lm-data-sdk-go/pull/35](https://togithub.com/logicmonitor/lm-data-sdk-go/pull/35)
- Bump go.opentelemetry.io/collector/pdata from 1.0.0-rc9 to
1.0.0-rcv0011 by [@&#8203;dependabot](https://togithub.com/dependabot)
in
[https://github.com/logicmonitor/lm-data-sdk-go/pull/38](https://togithub.com/logicmonitor/lm-data-sdk-go/pull/38)
- Support logs resource mapping config by
[@&#8203;avadhut123pisal](https://togithub.com/avadhut123pisal) in
[https://github.com/logicmonitor/lm-data-sdk-go/pull/44](https://togithub.com/logicmonitor/lm-data-sdk-go/pull/44)

#### New Contributors

- [@&#8203;anubhav6663](https://togithub.com/anubhav6663) made their
first contribution in
[https://github.com/logicmonitor/lm-data-sdk-go/pull/33](https://togithub.com/logicmonitor/lm-data-sdk-go/pull/33)

**Full Changelog**:
logicmonitor/lm-data-sdk-go@v1.0.0...v1.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants