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

syslogreceiver doesn't add resources #31849

Closed
ubcharron opened this issue Mar 20, 2024 · 1 comment · Fixed by #32010
Closed

syslogreceiver doesn't add resources #31849

ubcharron opened this issue Mar 20, 2024 · 1 comment · Fixed by #32010
Labels
bug Something isn't working receiver/syslog

Comments

@ubcharron
Copy link

Component(s)

receiver/syslog

What happened?

Description

According to the doc, the syslog receiver can add resources to every incoming syslog via the "resource" key:

Field: resource
Default value: []
Description: A map of key: value labels to add to the entry's resource

However, it doesn't seem to actually add them.

Steps to Reproduce

Setup syslog receiver:

receivers:
  syslog:
    resource:
      mytag: myvalue
    udp:
      listen_address: "127.0.0.1:514"
    protocol: rfc3164

Send a syslog message:

logger -d fdkskjsdf --server=localhost --rfc3164

Expected Result

The ResourceLog should have a resource attribute "mytag" with the value "myvalue".

Actual Result

The ResourceLog does not have any resource attributes.

Collector version

0.96.0

Environment information

Environment

OS: Ubuntu LTS

OpenTelemetry Collector configuration

receivers:
  syslog:
    resource:
      mytag: myvalue
    udp:
      listen_address: "127.0.0.1:514"
    protocol: rfc3164

exporters:
  debug:
    verbosity: detailed

service:
  pipelines:
    logs:
      receivers: [syslog]
      exporters: [debug]

Log output

2024-03-20T15:19:22.572Z        info    LogsExporter    {"kind": "exporter", "data_type": "logs", "name": "debug", "resource logs": 1, "log records": 1}
2024-03-20T15:19:22.572Z        info    ResourceLog #0
Resource SchemaURL:
ScopeLogs #0
ScopeLogs SchemaURL:
InstrumentationScope
LogRecord #0
ObservedTimestamp: 2024-03-20 15:19:22.568639715 +0000 UTC
Timestamp: 2024-03-20 15:19:22 +0000 UTC
SeverityText: notice
SeverityNumber: Info2(10)
Body: Str(<13>Mar 20 15:19:22 bcharron-wks-2 bcharron: fdkskjsdf)
Attributes:
     -> hostname: Str(bcharron-wks-2)
     -> facility: Int(1)
     -> appname: Str(bcharron)
     -> message: Str(fdkskjsdf)
     -> priority: Int(13)
Trace ID:
Span ID:
Flags: 0
        {"kind": "exporter", "data_type": "logs", "name": "debug"}

Additional context

No response

@ubcharron ubcharron added bug Something isn't working needs triage New item requiring triage labels Mar 20, 2024
Copy link
Contributor

Pinging code owners:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/syslog
Projects
None yet
2 participants