Package io.jenkins.plugins.opentelemetry
Class OtelUtils
java.lang.Object
io.jenkins.plugins.opentelemetry.OtelUtils
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
getMultibranchType
(Run run) static String
static String
getProjectType
(Run run) static String
getSystemPropertyOrEnvironmentVariable
(String environmentVariableName) getW3cTraceContext
(io.opentelemetry.api.trace.Span span) static boolean
hasOpentelemetryData
(Run<?, ?> run) Check if the run has Opentelemetry data To validate it search for the MonitoringAction in the build actions.static boolean
isFreestyle
(Run run) static boolean
static boolean
static boolean
isMultibranch
(Run run) static boolean
isMultibranchBranch
(Run run) static boolean
static boolean
isMultibranchTag
(Run run) static boolean
isWorkflow
(Run run) noteworthyConfigProperties
(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties configProperties) static String
prettyPrintConfiguration
(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config) static String
prettyPrintOtelSdkConfig
(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties configProperties, io.opentelemetry.sdk.resources.Resource resource) static String
prettyPrintResource
(io.opentelemetry.sdk.resources.Resource resource) static String
toDebugString
(io.opentelemetry.api.trace.Span span) static String
toDebugString
(org.jenkinsci.plugins.workflow.graph.FlowNode flowNode) static String
-
Field Details
-
FREESTYLE
- See Also:
-
MATRIX
- See Also:
-
MAVEN
- See Also:
-
MULTIBRANCH
- See Also:
-
WORKFLOW
- See Also:
-
UNKNOWN
- See Also:
-
BRANCH
- See Also:
-
CHANGE_REQUEST
- See Also:
-
TAG
- See Also:
-
JENKINS_CORE
- See Also:
-
UNKNOWN_VALUE
- See Also:
-
-
Constructor Details
-
OtelUtils
public OtelUtils()
-
-
Method Details
-
getSystemPropertyOrEnvironmentVariable
-
spanToDebugString
-
getProjectType
-
getMultibranchType
-
isMultibranchTag
-
isMultibranchChangeRequest
-
isMultibranchBranch
-
isMultibranch
-
isWorkflow
-
isFreestyle
-
isMatrix
-
isMaven
-
toDebugString
-
toDebugString
-
flowNodeToDebugString
-
urlEncode
-
getJenkinsVersion
-
getOpentelemetryPluginVersion
-
prettyPrintOtelSdkConfig
public static String prettyPrintOtelSdkConfig(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties configProperties, io.opentelemetry.sdk.resources.Resource resource) -
prettyPrintConfiguration
public static String prettyPrintConfiguration(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config) -
noteworthyConfigProperties
-
getW3cTraceContext
-
prettyPrintResource
public static String prettyPrintResource(@Nullable io.opentelemetry.sdk.resources.Resource resource) -
hasOpentelemetryData
Check if the run has Opentelemetry data To validate it search for the MonitoringAction in the build actions.- Parameters:
run
- the Build- Returns:
- true if the run has Opentelemetry data
-