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/clickhouse] Incorrect ServiceName set for Logs Records #36349

Closed
Fiery-Fenix opened this issue Nov 13, 2024 · 2 comments · Fixed by #36350
Closed

[exporter/clickhouse] Incorrect ServiceName set for Logs Records #36349

Fiery-Fenix opened this issue Nov 13, 2024 · 2 comments · Fixed by #36350
Labels
bug Something isn't working exporter/clickhouse

Comments

@Fiery-Fenix
Copy link
Contributor

Component(s)

exporter/clickhouse

What happened?

Description

In some corner cases, for Log Records clickhouseexporter inserts incorrect ServiceName value
For example, clickhouseexporter receives 2 Log Records in this order:

Steps to Reproduce

Feed to clickhouseexporter 2 Log Records:

  • First record with Resource Attribute service.name is equal to someservice
  • Second record - without Resource Attribute service.name

Expected Result

Written data should have following values in ServiceName field of otel_logs table:

  • someservice
  • Empty string

Actual Result

Actual written data have following values in ServiceName field of otel_logs table:

  • someservice
  • someservice

Collector version

v0.113.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@Fiery-Fenix Fiery-Fenix added bug Something isn't working needs triage New item requiring triage labels Nov 13, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@VihasMakwana
Copy link
Contributor

Removing triage label as this looks like a valid bug and has a bugfix PR linked

shivanthzen pushed a commit to shivanthzen/opentelemetry-collector-contrib that referenced this issue Dec 5, 2024
…pen-telemetry#36350)

#### Description
Fixing a bug in `clickhouseexporter` when ServiceName field in
ClickHouse for `otel_logs` table is set from previous Log Record, when
current LogRecord doesn't have `service.name` set

#### Link to tracking issue
Fixes open-telemetry#36349

#### Testing
Respective unit test is added to code

---------

Co-authored-by: Christos Markou <[email protected]>
Co-authored-by: Alex Boten <[email protected]>
ZenoCC-Peng pushed a commit to ZenoCC-Peng/opentelemetry-collector-contrib that referenced this issue Dec 6, 2024
…pen-telemetry#36350)

#### Description
Fixing a bug in `clickhouseexporter` when ServiceName field in
ClickHouse for `otel_logs` table is set from previous Log Record, when
current LogRecord doesn't have `service.name` set

#### Link to tracking issue
Fixes open-telemetry#36349

#### Testing
Respective unit test is added to code

---------

Co-authored-by: Christos Markou <[email protected]>
Co-authored-by: Alex Boten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/clickhouse
Projects
None yet
2 participants