-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
otlp_config
has no effect
#12780
Comments
limits_config.otlp_config
has no effectotlp_config
has no effect
@zarbis, updating your configuration is only one part of the implementation, how are you Attaching the structured metatdata to your log lines? |
@JStickler I expected it to be ingested by OTLP endpoint naturally due to how it's documented:
|
So you're using the OpenTelemetry Collector, which means you must use the otlphttp exporter, which does not support structured metadata. The docs need to be updated, as we have two OLTP solutions. |
Indeed I do. The entire Ingesting logs to Loki using OpenTelemetry Collector doc reads like:
If Just in case, this is relevant part of my Collector config (I run entire LGTM stack through it so showing only logs part of it): config:
receivers:
otlp:
protocols:
http: ...
exporters:
otlphttp/loki:
endpoint: http://loki-gateway/otlp
auth: ...
sending_queue: ...
loki:
endpoint: http://loki-gateway/loki/api/v1/push
auth: ...
sending_queue: ...
service:
pipelines:
logs:
receivers:
- otlp
processors:
- memory_limiter
- attributes/loki
- resource/loki
- batch
exporters:
- debug/normal
# - otlphttp/loki
- loki I've tried running |
Hey @zarbis, sorry for the inconvenience and thanks for reporting the issue. |
@sandeepsukhani I've moved otlp_config:
resource_attributes:
attributes_config:
- action: drop
attributes:
- k8s.pod.name
- k8s.deployment.name
log_attributes:
- action: drop
regex: .*
scope_attributes:
- action: drop
regex: .*
|
Describe the bug
I'm trying to utilize
otlp_config
to shift some attributes I was previously dropping into newly introducedStructured metadata
.My attempts were ineffective and it's hard to distinguish indexed label and non-indexed attribute in Explore UI, so I decided to test radical removal of attributes with the following config.
This still resulted in no changes in observed
Fields
in Explore UI. So I've enabled debug logging onOTel Collector
to see the data I'm sending to Loki.Here is an example of log record produced by debug exporter:
And here is the list if observed
Fields
So it is still exactly a combination of
resource_attributes
andlog_attributes
plus auto-discoveredlevel
andservice_name
.Additionally I've confirmed, that
k8s_pod_name
is indexed label whilek8s_pod_uid
is non-indexed field, which follows default behavior. And mere presence ofpod
,container
,namespace
,cluster
andalerting_tier
makes me think thatotlp_config
is completely ineffective.In ingester's debug log I see lines like those:
so it somehow still produces those labels I'm trying to drop.
Expected behavior
I expect majority of
Fields
to be absent in Explore, plus reduced resource consumption by Loki.Environment:
6.3.4
The text was updated successfully, but these errors were encountered: