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

ElasticSearch Exporter does not follow ECS guidelines and logging reference #3091

Open
ShadowMaxLeb opened this issue Oct 11, 2024 · 3 comments · May be fixed by #3107
Open

ElasticSearch Exporter does not follow ECS guidelines and logging reference #3091

ShadowMaxLeb opened this issue Oct 11, 2024 · 3 comments · May be fixed by #3107
Labels
bug Something isn't working good first issue Good for newcomers help wanted Good for taking. Extra help will be provided by maintainers triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@ShadowMaxLeb
Copy link
Contributor

Describe your environment

Version 1.17.0 of this project.

Steps to reproduce
Use the ElasticsearchLogRecordExporter

What is the expected behavior?
The json sent should follow the ECS guidelines as much as possible as well as the ECS logging reference

What is the actual behavior?
Some basic field needed by ELK are not there like @timestamp (timestamp today in the code)

General guidelines
The document MUST have the @timestamp field.
Use the [data types](https://www.elastic.co/guide/en/elasticsearch/reference/8.15/mapping-types.html) defined for an ECS field.
Use the ecs.version field to define which version of ECS is used.
Map as many fields as possible to ECS.

All attributes/resources are set under the attributes/resources key while I think they should be set at the root of the json or at least give a possibility to set attributes/resources at the root of the object so we can fill some fields like user.id

@ShadowMaxLeb ShadowMaxLeb added the bug Something isn't working label Oct 11, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 11, 2024
@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. help wanted Good for taking. Extra help will be provided by maintainers and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 17, 2024
Copy link

This issue is available for anyone to work on. Make sure to reference this issue in your pull request.
✨ Thank you for your contribution! ✨

@Neema-Joju
Copy link

Hi,
I am an outreachy applicant. May I attempt this?

@ShadowMaxLeb
Copy link
Contributor Author

I have started some work that I should share soon.
There might be some point to discuss.

ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
`attributes`

This allows user to set other fields that are part of the [ECS log documentation](https://www.elastic.co/guide/en/ecs/8.11/ecs-log.html).
For instance, it allows to have an attribute with key `log.file`, that
will, thanks to `nlohmann::json`, appear as :
```
{
  "log": {
    "file": "xxx"
  }
}
```

Closes open-telemetry#3091
@ShadowMaxLeb ShadowMaxLeb linked a pull request Oct 18, 2024 that will close this issue
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
`attributes`

This allows user to set other fields that are part of the [ECS log documentation](https://www.elastic.co/guide/en/ecs/8.11/ecs-log.html).
For instance, it allows to have an attribute with key `log.file`, that
will, thanks to `nlohmann::json`, appear as :
```
{
  "log": {
    "file": "xxx"
  }
}
```

Closes open-telemetry#3091
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
`attributes`

This allows user to set other fields that are part of the [ECS log documentation](https://www.elastic.co/guide/en/ecs/8.11/ecs-log.html).
For instance, it allows to have an attribute with key `log.file`, that
will, thanks to `nlohmann::json`, appear as :
```
{
  "log": {
    "file": "xxx"
  }
}
```

Closes open-telemetry#3091
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
ShadowMaxLeb added a commit to Shadow-Official/opentelemetry-cpp that referenced this issue Oct 18, 2024
`attributes`

This allows user to set other fields that are part of the [ECS log documentation](https://www.elastic.co/guide/en/ecs/8.11/ecs-log.html).
For instance, it allows to have an attribute with key `log.file`, that
will, thanks to `nlohmann::json`, appear as :
```
{
  "log": {
    "file": "xxx"
  }
}
```

Closes open-telemetry#3091
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Good for taking. Extra help will be provided by maintainers triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants