-
Notifications
You must be signed in to change notification settings - Fork 54
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
With otel.logs.mirror_to_disk=true
enabled link to Grafana isn't visible in Console Output
#773
Comments
otel.logs.mirror_to_disk=true
enabled link to Grafana isn't visible in Console Output
It would be complicated to insert the link "View logs in Grafana" as we would have to reimplement the visualization of logs stored in the Jenkins Home file system. Please see our new capability to visualize in the Jenkins GUI the pipeline logs stored in Loki and tell us if this enhancement solves your need. |
Will this work if we have Loki write and read at different URLs? |
It's not really "loki write", it's OTLP logs endpoint, typically an OTel Collector on the Jenkins Controller.
Does it make sense? |
@chewrocca I've had exactly same issue (with other similar issues), after playing around with the configs I got the plugin working properly showing logs in UI in addition to Grafana.
same configs as mentioned above, but I had to add |
@ArieLevs super interesting, I have not tested with a Loiki Tenant ID (I test with Grafana Cloud). Do you mind creating an issue if log retrieving is bugged when using a Loki Tenant ID? |
FYI I'm adding capabilities to detect problems sending logs from Jenkins build agents to the OTLP logs endpoint thanks to a capability to check connectivity from the OTel SDK running in the Jenkins build agent to their OTLP destination: |
I tried setting the |
@chewrocca if you still face the problem below, please create an issue, it's a different problem from "When
|
I'm not able to point directly on the problem, as it took me many attempts to get it working, for example (and again I;m not 100% sure) when the tenant ID in Jenkins configs is not identical to the tenant ID I've configured in otel collector, it didn't worked. here are my configs that successfully work: (I'm running a dedicated otel collector just for Jenkins) exporters:
debug: {}
loki:
auth:
authenticator: basicauth/loki
endpoint: https://<LOKI_HOST>/loki/api/v1/push
headers:
X-Scope-OrgID: <JENKINS_TENANT_ID>
otlphttp:
auth:
authenticator: basicauth/tempo
endpoint: https://<TEMPO_HOST>
otlphttp/loki:
auth:
authenticator: basicauth/loki
endpoint: https://<LOKI_HOST>/otlp
headers:
X-Scope-OrgID: <JENKINS_TENANT_ID>
extensions:
basicauth/loki:
client_auth:
password: ${env:LOKI_PASSWORD}
username: ${env:LOKI_USERNAME}
basicauth/tempo:
client_auth:
password: ${env:TEMPO_PASSWORD}
username: ${env:TEMPO_USERNAME}
bearertokenauth:
token: ${env:BEARER_TOKEN}
processors:
batch: {}
memory_limiter:
check_interval: 5s
limit_percentage: 80
spike_limit_percentage: 25
receivers:
otlp:
protocols:
grpc:
auth:
authenticator: bearertokenauth
endpoint: ${env:MY_POD_IP}:4317
include_metadata: true
http:
auth:
authenticator: bearertokenauth
endpoint: ${env:MY_POD_IP}:4318
include_metadata: true
service:
extensions:
- health_check
- memory_ballast
- bearertokenauth
- basicauth/loki
- basicauth/tempo
pipelines:
logs:
exporters:
- debug
- otlphttp/loki
processors:
- memory_limiter
- batch
receivers:
- otlp
- k8sobjects
metrics:
exporters:
- debug
processors:
- memory_limiter
- batch
receivers:
- otlp
traces:
exporters:
- otlphttp
processors:
- memory_limiter
- batch
receivers:
- otlp and Jenkins CASC otel configs: openTelemetry:
authentication:
bearerTokenAuthentication:
tokenId: "otel-access-token"
disabledResourceProviders: "io.opentelemetry.instrumentation.resources.ProcessResourceProvider"
endpoint: "http://JENKIS_OTEL_COLLECTOR_HOST:4317"
exportOtelConfigurationAsEnvironmentVariables: true
ignoredSteps: "dir,echo,isUnix,pwd,properties"
observabilityBackends:
- grafana:
grafanaBaseUrl: "https://<GRAFANA_HOST>"
grafanaLogsBackend:
grafanaLogsBackendWithJenkinsVisualization:
grafanaLokiDatasourceIdentifier: "<LOKI_DATASOURCE_UID_FOR_LOGS_FROM_JENKINS>" # Note this is a datasource that is configured with the "<JENKINS_TENANT_ID>" header
lokiCredentialsId: "loki"
lokiOTelLogFormat: "LOKI_V3_OTEL_FORMAT"
lokiTenantId: "<JENKINS_TENANT_ID>"
lokiUrl: "https://<LOKI_HOST>"
tempoDataSourceIdentifier: "<TEMPO_TRACES_UID>"
serviceName: "jenkins"
serviceNamespace: "jenkins" please note that while above is working fine (getting the Grafana icon with a link that redirects me to Grafana UI with a specific trace filter), |
What feature do you want to see added?
If
otel.logs.mirror_to_disk=true
is enabled, the link to Grafana Loki logs doesn't appear under Console Output.Upstream changes
No response
Are you interested in contributing this feature?
No response
The text was updated successfully, but these errors were encountered: