Package io.jenkins.plugins.opentelemetry
Class JenkinsOpenTelemetryPluginConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.opentelemetry.JenkinsOpenTelemetryPluginConfiguration
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,Loadable
,OnMaster
@Extension(ordinal=2.147483646E9)
@Symbol("openTelemetry")
public class JenkinsOpenTelemetryPluginConfiguration
extends GlobalConfiguration
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionprotected OpenTelemetryConfiguration
The previously used configuration.Fields inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
configure
(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) void
Initialize the Otel SDK, must happen after the plugin has been configured by the standard config and by JCasC JCasC configuration happens during `SYSTEM_CONFIG_ADAPTED` (see `io.jenkins.plugins.casc.ConfigurationAsCode#init()`)doCheckEndpoint
(String endpoint) A warning if it's selected.doCheckIgnoredSteps
(String ignoredSteps) Validates the period duration input.findStepPluginOrDefault
(String stepName, Descriptor<? extends Describable> descriptor) findStepPluginOrDefault
(String buildStepName, BuildStep buildStep) findStepPluginOrDefault
(String stepName, org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode node) findStepPluginOrDefault
(String stepName, org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode node) findSymbolOrDefault
(String buildStepName, Descriptor<? extends Describable> descriptor) findSymbolOrDefault
(String buildStepName, BuildStep buildStep) get()
https://github.com/spotbugs/spotbugs/issues/1175io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties
Never emptyUsed in io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/config.jelly because cyrille doesn't know how to format the content with linebreaks in a html teaxtareaio.opentelemetry.sdk.resources.Resource
Used in io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/config.jelly because cyrille doesn't know how to format the content with linebreaks in a html teaxtareaFor visualisation in config.jellyboolean
void
protected Object
sanitizeOtlpEndpoint
(String grpcEndpoint) void
setAuthentication
(OtlpAuthentication authentication) void
setConfigurationProperties
(String configurationProperties) void
setDisabledResourceProviders
(String disabledResourceProviders) void
setEndpoint
(String endpoint) void
setExporterIntervalMillis
(Integer exporterIntervalMillis) void
setExporterTimeoutMillis
(Integer exporterTimeoutMillis) void
setExportOtelConfigurationAsEnvironmentVariables
(boolean exportOtelConfigurationAsEnvironmentVariables) void
setIgnoredSteps
(String ignoredSteps) void
setJenkinsLocationConfiguration
(JenkinsLocationConfiguration jenkinsLocationConfiguration) void
setObservabilityBackends
(List<ObservabilityBackend> observabilityBackends) void
setServiceName
(String serviceName) void
setServiceNamespace
(String serviceNamespace) void
setTrustedCertificatesPem
(String trustedCertificatesPem) Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Field Details
-
currentOpenTelemetryConfiguration
The previously used configuration. Kept in memory to prevent unneeded reconfigurations.
-
-
Constructor Details
-
JenkinsOpenTelemetryPluginConfiguration
@DataBoundConstructor public JenkinsOpenTelemetryPluginConfiguration()
-
-
Method Details
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
readResolve
-
toOpenTelemetryConfiguration
-
configureOpenTelemetrySdk
@Initializer(after=SYSTEM_CONFIG_ADAPTED, before=JOB_LOADED) public void configureOpenTelemetrySdk()Initialize the Otel SDK, must happen after the plugin has been configured by the standard config and by JCasC JCasC configuration happens during `SYSTEM_CONFIG_ADAPTED` (see `io.jenkins.plugins.casc.ConfigurationAsCode#init()`) -
sanitizeOtlpEndpoint
- Returns:
null
or endpoint URI prefixed by a protocol scheme ("http://", "https://"...)
-
getEndpoint
Never empty -
setEndpoint
-
getAuthentication
-
setAuthentication
-
getTrustedCertificatesPem
-
setTrustedCertificatesPem
-
setObservabilityBackends
@DataBoundSetter public void setObservabilityBackends(List<ObservabilityBackend> observabilityBackends) -
getObservabilityBackends
-
getExporterTimeoutMillis
-
setExporterTimeoutMillis
-
getExporterIntervalMillis
-
setExporterIntervalMillis
-
getIgnoredSteps
-
setIgnoredSteps
-
getStatusUnsetCausesOfInterruption
-
getDisabledResourceProviders
-
setDisabledResourceProviders
-
isExportOtelConfigurationAsEnvironmentVariables
public boolean isExportOtelConfigurationAsEnvironmentVariables() -
setExportOtelConfigurationAsEnvironmentVariables
@DataBoundSetter public void setExportOtelConfigurationAsEnvironmentVariables(boolean exportOtelConfigurationAsEnvironmentVariables) -
getConfigurationProperties
-
setConfigurationProperties
-
getOtelConfigurationAsEnvironmentVariables
-
setJenkinsLocationConfiguration
@Inject public void setJenkinsLocationConfiguration(@NonNull JenkinsLocationConfiguration jenkinsLocationConfiguration) -
getVisualisationObservabilityBackendsString
For visualisation in config.jelly -
getLoadedStepsPlugins
@NonNull public ConcurrentMap<String,JenkinsOpenTelemetryPluginConfiguration.StepPlugin> getLoadedStepsPlugins() -
addStepPlugin
-
findStepPluginOrDefault
@NonNull public JenkinsOpenTelemetryPluginConfiguration.StepPlugin findStepPluginOrDefault(@NonNull String buildStepName, @NonNull BuildStep buildStep) -
findStepPluginOrDefault
@NonNull public JenkinsOpenTelemetryPluginConfiguration.StepPlugin findStepPluginOrDefault(@NonNull String stepName, @NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode node) -
findStepPluginOrDefault
@NonNull public JenkinsOpenTelemetryPluginConfiguration.StepPlugin findStepPluginOrDefault(@NonNull String stepName, @NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode node) -
findStepPluginOrDefault
@NonNull public JenkinsOpenTelemetryPluginConfiguration.StepPlugin findStepPluginOrDefault(@NonNull String stepName, @Nullable Descriptor<? extends Describable> descriptor) -
findSymbolOrDefault
-
findSymbolOrDefault
@NonNull public String findSymbolOrDefault(@NonNull String buildStepName, @Nullable Descriptor<? extends Describable> descriptor) -
getServiceName
- See Also:
-
ServiceAttributes.SERVICE_NAME
-
setServiceName
-
getServiceNamespace
- See Also:
-
ServiceIncubatingAttributes.SERVICE_NAMESPACE
-
setServiceNamespace
-
getResource
@NonNull public io.opentelemetry.sdk.resources.Resource getResource() -
getResourceAsText
Used in io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/config.jelly because cyrille doesn't know how to format the content with linebreaks in a html teaxtarea -
getConfigProperties
@NonNull public io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties getConfigProperties() -
getNoteworthyConfigPropertiesAsText
Used in io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/config.jelly because cyrille doesn't know how to format the content with linebreaks in a html teaxtarea -
getLogStorageRetriever
-
get
https://github.com/spotbugs/spotbugs/issues/1175 -
doCheckEndpoint
See OpenTelemetry Specification / OpenTelemetry Protocol ExporterTarget URL to which the exporter is going to send spans or metrics. The endpoint MUST be a valid URL with scheme (http or https) and host, MAY contain a port, SHOULD contain a path and MUST NOT contain other parts (such as query string or fragment). A scheme of https indicates a secure connection.
-
doCheckIgnoredSteps
Validates the period duration input.- Parameters:
ignoredSteps
- the comma-separated list of steps to ignore.- Returns:
- ok if the form input was valid
-
doCheckExportOtelConfigurationAsEnvironmentVariables
public FormValidation doCheckExportOtelConfigurationAsEnvironmentVariables(@QueryParameter String value) A warning if it's selected.- Parameters:
value
- the exportOtelConfigurationAsEnvironmentVariables flag- Returns:
- ok if the form input was valid
-
preDestroy
- Throws:
Exception
-