Comments (5)
Thanks @ipleten , I'm sorry but I don't understand well the problem. I have not worked on this area for a while.
Can you please share with us a simplified test case to reproduce the problem and indications of he span attributes that are contributing to the problem?
from opentelemetry-plugin.
Here is pipeline:
pipeline {
agent {
kubernetes {
yaml '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: shell
image: ubuntu
command:
- sleep
args:
- infinity
'''
defaultContainer 'shell'
}
}
stages {
stage('first') {
steps {
echo "passed"
}
}
stage('second') {
steps {
echo "passed"
}
}
stage('failed') {
steps {
sh "exit 1" // <- LET'S FAIL HERE
}
}
stage('it_also_ failed_but_it_skipped') {
steps {
echo "passed".
}
}
stage('it_also_failed_but_it_skipped_2') {
steps {
echo "passed"
}
}
}
}
Here is a log output:
[Pipeline] {
[Pipeline] container
[Pipeline] {
[Pipeline] stage
[Pipeline] { (first)
[Pipeline] echo
passed
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (second)
[Pipeline] echo
passed
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (failed)
[Pipeline] sh
+ exit 1
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (it_also_ failed_but_it_skipped)
Stage "it_also_ failed_but_it_skipped" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (it_also_failed_but_it_skipped_2)
Stage "it_also_failed_but_it_skipped_2" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
Here is what data we have in cause
:
As you might see this is impossible to find out which stage failed exactly as all three stages has the same status and description. (We currently filtering them by the fact that duration.ms
is less than 1 sec.)
We want to be able to exclude 'skipped' or the way to find really 'failed' stage even if it's nested.
Populating jenkins.pipeline.step.interruption.causes
with 'skipped due to earlier failure(s)' might help in this.
from opentelemetry-plugin.
if you filter by event.outcome==failure
and labels.jenkins_pipeline_step_type!=stage
then you have the steps that failed, if you order by labels.jenkins_pipeline_step_id
you will know which one failed first, I am not wrong will be only one.
To know the stage that failed you can follow a similar approach, filter by event.outcome=failure
and labels.jenkins_pipeline_step_type==stage
then you have the steps that failed, if you order by labels.jenkins_pipeline_step_id
you will know which one failed first (the minimum value will work too)
from opentelemetry-plugin.
I am not working with Jenkins anymore so I can't test this.
Main goal of ticket was to find the reason why stage was not run or failed (including skipped due to conditions).
from opentelemetry-plugin.
Main goal of ticket was to find the reason why stage was not run or failed (including skipped due to conditions).
It is how Jenkins pipelines manage stages, it has nothing to do with the plugin. In the plugin latest version of the plugin we have included a label to mark the step that failed jenkins.pipeline.step.result
from opentelemetry-plugin.
Related Issues (20)
- TeeBuildListener incompatible with OutputStreamTaskListener HOT 8
- SERVICE_NAMESPACE_AND_NAME does not play nicely with Tempo tags HOT 4
- Unclear documentation for custom observability backend URLs HOT 4
- View as plain text" under Console Output still displaying when external logging is setup. HOT 2
- OpenTelemetry Proposal: Introduce semantic conventions for CI/CD observability HOT 1
- With `otel.logs.mirror_to_disk=true` enabled link to Grafana isn't visible in Console Output HOT 11
- [Regresion] testFreestyleJob_with_ant_plugin test is failling HOT 1
- Some logs lines have the display name (job #number) as pipeline_id and others the fullname
- Optionally include pipeline build span attributes in related step spans HOT 3
- I see a lot of GET calls which I want to mask for traces and just see BUILD HOT 1
- Using withSpanAttribute removes information about stages HOT 2
- MonitoringAction NOT found on run HOT 2
- Failed to parse URL
- Grafana visualization link does not work HOT 1
- Add additional prometheus labels to metrics HOT 2
- Mirror logs into Elastic in an background like mode HOT 1
- Send Logs To Loki while Still Preserving Console Output HOT 5
- Allow to chose longer time range on grafana/tempo HOT 1
- When installing opentelemetry plugin in Cloudbees CI, traces are not getting generated. HOT 1
- Integrate Jenkins OpenTelemetry with Gradle OpenTelemetry HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentelemetry-plugin.