Skip to content

[connector/exceptionsconnector] the dimension configuration does not support the resource attributes context #34603

@JaredTan95

Description

@JaredTan95

Component(s)

connector/exceptions

What happened?

Description

Configure additional attribute in dimensions as described in the documentation, such as adding k8s.namespace.name, and find that the resulting metric or logs do not record k8s.namespace.name:

  exceptions/traces:
    dimensions:
      - name: k8s.namespace.name # 👈  add additional dimension that dons't in span or event attributes 
      - name: exception.type
      - name: exception.message
      - name: exception.stacktrace
      # span name
      - name: name

c.attrToLogRecord(sl, serviceName, span, event)

I think we need should pass a resource attribute, similar to spanmetricconnector

if v, ok := getDimensionValue(d, span.Attributes(), resourceAttrs); ok {

Collector version

main

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions