io.opentelemetry.instrumentation.quartz.v2_0.QuartzSpanNameExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-quartz-2.0 Show documentation
Show all versions of opentelemetry-quartz-2.0 Show documentation
Instrumentation of Java libraries using OpenTelemetry.
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.instrumentation.quartz.v2_0;
import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor;
import org.quartz.JobExecutionContext;
import org.quartz.JobKey;
final class QuartzSpanNameExtractor implements SpanNameExtractor {
@Override
public String extract(JobExecutionContext job) {
JobKey key = job.getJobDetail().getKey();
return key.getGroup() + '.' + key.getName();
}
}