jenkinsci / opentelemetry-plugin

Monitor and observe Jenkins with OpenTelemetry.
https://plugins.jenkins.io/opentelemetry/
Apache License 2.0
98 stars 50 forks source link

No hyper links on donwstream jobs with logs stored in Elastic #644

Closed bulanovk closed 1 year ago

bulanovk commented 1 year ago

Jenkins and plugins versions report

Environment ```Jenkins: 2.403 OS: Linux - 5.15.0-48-generic Java: 17.0.6-ea - Red Hat, Inc. (OpenJDK 64-Bit Server VM) --- Parameterized-Remote-Trigger:3.1.6.3 active-directory:2.30 allure-jenkins-plugin:2.30.3 amazon-codeartifact-plugin:1.0.2 analysis-model-api:11.2.0 ansible:174.vfd5323d2b_9d8 ansicolor:1.0.2 ant:487.vd79d090d4ea_e antisamy-markup-formatter:159.v25b_c67cd35fb_ apache-httpcomponents-client-4-api:4.5.14-150.v7a_b_9d17134a_5 apache-httpcomponents-client-5-api:5.2.1-1.0 artifactory:3.15.3 authentication-tokens:1.53.v1c90fd9191a_b_ aws-credentials:191.vcb_f183ce58b_9 aws-java-sdk:1.12.447-382.vda_68e2007233 aws-java-sdk-cloudformation:1.12.447-382.vda_68e2007233 aws-java-sdk-codebuild:1.12.447-382.vda_68e2007233 aws-java-sdk-ec2:1.12.447-382.vda_68e2007233 aws-java-sdk-ecr:1.12.447-382.vda_68e2007233 aws-java-sdk-ecs:1.12.447-382.vda_68e2007233 aws-java-sdk-efs:1.12.447-382.vda_68e2007233 aws-java-sdk-elasticbeanstalk:1.12.447-382.vda_68e2007233 aws-java-sdk-iam:1.12.447-382.vda_68e2007233 aws-java-sdk-kinesis:1.12.447-382.vda_68e2007233 aws-java-sdk-logs:1.12.447-382.vda_68e2007233 aws-java-sdk-minimal:1.12.447-382.vda_68e2007233 aws-java-sdk-sns:1.12.447-382.vda_68e2007233 aws-java-sdk-sqs:1.12.447-382.vda_68e2007233 aws-java-sdk-ssm:1.12.447-382.vda_68e2007233 aws-secrets-manager-credentials-provider:1.202.ve0ec0c17611c aws-secrets-manager-secret-source:1.62.v120c8e5058ee bootstrap4-api:4.6.0-5 bootstrap5-api:5.2.2-2 bouncycastle-api:2.27 branch-api:2.1071.v1a_188a_562481 build-name-setter:2.2.0 build-timeout:1.30 build-timestamp:1.0.3 build-user-vars-plugin:1.9 buildrotator:1.2 caffeine-api:3.1.6-115.vb_8b_b_328e59d8 checks-api:2.0.0 cloudbees-folder:6.815.v0dd5a_cb_40e0e code-coverage-api:4.4.0 command-launcher:100.v2f6722292ee8 commons-lang3-api:3.12.0-36.vd97de6465d5b_ commons-text-api:1.10.0-36.vc008c8fcda_7b_ conditional-buildstep:1.4.2 config-file-provider:3.11.1 configuration-as-code:1625.v27444588cc3d configuration-as-code-groovy:1.1 copyartifact:698.v393f578eb_ddc credentials:1236.v31e44e6060c0 credentials-binding:604.vb_64480b_c56ca_ custom-tools-plugin:0.8 dashboard-view:2.472.v9ff2a_e6a_c529 data-tables-api:1.13.3-3 display-url-api:2.3.7 docker-build-publish:1.4.0 docker-commons:419.v8e3cd84ef49c docker-java-api:3.2.13-68.va_875df25a_b_45 docker-workflow:563.vd5d2e5c4007f downstream-build-cache:1.7 dtkit-api:3.0.2 durable-task:504.vb10d1ae5ba2f echarts-api:5.4.0-3 email-ext:2.96 emailext-template:1.5 envinject:2.901.v0038b_6471582 envinject-api:1.199.v3ce31253ed13 extended-choice-parameter:373.v1a_ecea_fdf2a_a_ extended-read-permission:3.2 extensible-choice-parameter:1.8.0 external-monitor-job:203.v683c09d993b_9 font-awesome-api:6.3.0-2 forensics-api:2.1.0 generic-webhook-trigger:1.86.3 git:5.0.1 git-client:4.2.0 git-parameter:0.9.18 git-server:99.va_0826a_b_cdfa_d github:1.37.0 github-api:1.303-417.ve35d9dd78549 github-branch-source:1703.vd5a_2b_29c6cdc gitlab-plugin:1.7.12 google-oauth-plugin:1.0.8 gradle:2.5.1 groovy:453.vcdb_a_c5c99890 h2-api:11.1.4.199-12.v9f4244395f7a_ hashicorp-vault-plugin:360.v0a_1c04cf807d hidden-parameter:94.ve2cefce14d3f htmlpublisher:1.31 http_request:1.16 instance-identity:142.v04572ca_5b_265 ionicons-api:45.vf54fca_5d2154 ivy:2.4 jackson2-api:2.15.0-334.v317a_165f9b_7c jacoco:3.3.3 jakarta-activation-api:2.0.1-3 jakarta-mail-api:2.0.1-3 javadoc:233.vdc1a_ec702cff javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.8-1 jdk-tool:66.vd8fa_64ee91b_d jenkins-atp-two-runner-plugin:2.2.48 jenkins-jwt-rest-plugin:0.0.2 jersey2-api:2.39.1-1 jersey3-api:3.1.1-1 jjwt-api:0.11.5-77.v646c772fddb_0 jnr-posix-api:3.1.16-2 job-dsl:1.83 job-parameter-summary:0.5 jquery:1.12.4-1 jquery3-api:3.6.4-1 jsch:0.1.55.61.va_e9ee26616e7 junit:1198.ve38db_d1b_c975 junit-attachments:131.vef2117770555 kubernetes:3923.v294a_d4250b_91 kubernetes-client-api:6.4.1-215.v2ed17097a_8e9 kubernetes-credentials:0.10.0 ldap:673.v034ec70ec2b_b_ lockable-resources:1150.v59db_2b_994618 mailer:448.v5b_97805e3767 mapdb-api:1.0.9-28.vf251ce40855d mask-passwords:150.vf80d33113e80 matrix-auth:3.1.7 matrix-groovy-execution-strategy:1.0.8 matrix-project:789.v57a_725b_63c79 maven-plugin:3.22 metrics:4.2.13-420.vea_2f17932dd6 mina-sshd-api-common:2.9.2-62.v199162f0a_2f8 mina-sshd-api-core:2.9.2-62.v199162f0a_2f8 monitoring:1.94.0 nodejs:1.6.0 oauth-credentials:0.645.ve666a_c332668 oic-auth:2.5 okhttp-api:4.10.0-132.v7a_7b_91cef39c opentelemetry:2.13.0 pam-auth:1.10 parameter-separator:1.3 parameterized-scheduler:1.2 parameterized-trigger:2.45 permissive-script-security:0.7 pipeline-aggregator-view:1.15 pipeline-build-step:491.v1fec530da_858 pipeline-github-lib:42.v0739460cda_c4 pipeline-graph-analysis:202.va_d268e64deb_3 pipeline-graph-view:183.v9e27732d970f pipeline-groovy-lib:656.va_a_ceeb_6ffb_f7 pipeline-input-step:468.va_5db_051498a_4 pipeline-maven:1298.v43b_82f220a_e9 pipeline-milestone-step:111.v449306f708b_7 pipeline-model-api:2.2125.vddb_a_44a_d605e pipeline-model-definition:2.2125.vddb_a_44a_d605e pipeline-model-extensions:2.2125.vddb_a_44a_d605e pipeline-rest-api:2.32 pipeline-stage-step:305.ve96d0205c1c6 pipeline-stage-tags-metadata:2.2125.vddb_a_44a_d605e pipeline-stage-view:2.32 pipeline-utility-steps:2.15.2 plain-credentials:143.v1b_df8b_d3b_e48 plugin-util-api:3.2.0 popper-api:1.16.1-3 popper2-api:2.11.6-2 prism-api:1.29.0-4 publish-over:0.22 python:1.3 rebuild:320.v5a_0933a_e7d61 resource-disposer:0.22 rich-text-publisher-plugin:1.4 role-strategy:631.va_dd0d500b_fc5 run-condition:1.5 saml:4.403.v423b_3195a_9ec scm-api:667.v8b_6e07cdc7f2 script-security:1244.ve463715a_f89c select2-api:4.0.13-8 simple-theme-plugin:146.v0e67db_a_9052e slave-setup:1.10 snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4 ssh-agent:333.v878b_53c89511 ssh-credentials:305.v8f4381501156 ssh-slaves:2.877.v365f5eb_a_b_eec sshd:3.275.v9e17c10f2571 structs:324.va_f5d6774f3a_d subversion:2.17.2 timestamper:1.24 token-macro:359.vb_cde11682e0c trilead-api:2.84.v72119de229b_7 uno-choice:2.6.5 update-sites-manager:2.0.0 variant:59.vf075fe829ccb vaultCredentialStore:1.0.2 versioncolumn:145.va_e3ca_f8a_a_d23 warnings-ng:10.1.0 workflow-aggregator:596.v8c21c963d92d workflow-api:1208.v0cc7c6e0da_9e workflow-basic-steps:1017.vb_45b_302f0cea_ workflow-cps:3659.v582dc37621d8 workflow-durable-task-step:1246.v5524618ea_097 workflow-job:1292.v27d8cc3e2602 workflow-multibranch:746.v05814d19c001 workflow-remote-loader:1.5 workflow-scm-step:408.v7d5b_135a_b_d49 workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:839.v35e2736cfd5c ws-cleanup:0.45 xunit:3.1.2 yet-another-build-visualizer:1.16 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Centos 8

Reproduction steps

  1. Create 2 job
  2. Add step to executer Job 2 from Job 1 as a downstream
  3. Run Job 1
  4. Open Logs

Expected Results

18:22:44  Scheduling project: job2
18:22:52  Starting building: job2#1

job2#1- is a hyper link to job2 build

Actual Results

No hyper links to downstream build, only plain text

Anything else?

No response

kuisathaverat commented 1 year ago

The plugin only store plain text

bulanovk commented 1 year ago

Yes, Jenkins also store only plain text, but shows downstream job as a link during log rendering

kuisathaverat commented 1 year ago

IIRC enabling the local mirror does not use the logs stored in Elasticsearch so the links would be available, see https://github.com/jenkinsci/opentelemetry-plugin/blob/master/docs/build-logs.md#can-build-logs-be-saved-in-the-build-folder-locally

I dunno, if it is, your case, but BO has a bug related to those links

https://issues.jenkins.io/browse/JENKINS-60995 https://issues.jenkins.io/browse/JENKINS-56562 https://issues.jenkins.io/browse/JENKINS-54104