Skip to content

Commit e354cca

Browse files
authored
[File based config] InternalRootOffSampler (#2493)
* InternalRootOffSampler support * Comment removed
1 parent fb60050 commit e354cca

File tree

4 files changed

+44
-3
lines changed

4 files changed

+44
-3
lines changed

custom/src/main/java/com/splunk/opentelemetry/InternalRootOffSampler.java renamed to custom/src/main/java/com/splunk/opentelemetry/sampler/InternalRootOffSampler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.splunk.opentelemetry;
17+
package com.splunk.opentelemetry.sampler;
1818

1919
import io.opentelemetry.api.common.Attributes;
2020
import io.opentelemetry.api.trace.Span;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright Splunk Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.splunk.opentelemetry.sampler;
18+
19+
import com.google.auto.service.AutoService;
20+
import io.opentelemetry.api.incubator.config.DeclarativeConfigProperties;
21+
import io.opentelemetry.sdk.autoconfigure.spi.internal.ComponentProvider;
22+
import io.opentelemetry.sdk.trace.samplers.Sampler;
23+
24+
@SuppressWarnings("rawtypes")
25+
@AutoService(ComponentProvider.class)
26+
public class InternalRootOffSamplerComponentProvider implements ComponentProvider<Sampler> {
27+
@Override
28+
public String getName() {
29+
return "internal_root_off";
30+
}
31+
32+
@Override
33+
public Class<Sampler> getType() {
34+
return Sampler.class;
35+
}
36+
37+
@Override
38+
public Sampler create(DeclarativeConfigProperties samplerProperties) {
39+
return new InternalRootOffSampler();
40+
}
41+
}

custom/src/main/java/com/splunk/opentelemetry/InternalRootOffSamplerProvider.java renamed to custom/src/main/java/com/splunk/opentelemetry/sampler/InternalRootOffSamplerProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.splunk.opentelemetry;
17+
package com.splunk.opentelemetry.sampler;
1818

1919
import com.google.auto.service.AutoService;
2020
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;

custom/src/test/java/com/splunk/opentelemetry/InternalRootOffSamplerTest.java renamed to custom/src/test/java/com/splunk/opentelemetry/sampler/InternalRootOffSamplerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.splunk.opentelemetry;
17+
package com.splunk.opentelemetry.sampler;
1818

1919
import static org.junit.jupiter.api.Assertions.assertEquals;
2020

0 commit comments

Comments
 (0)