-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: otlp use its own thread pool (#831)
- Loading branch information
Showing
5 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
server/otlp/otlp-server/src/main/java/io/holoinsight/server/otlp/server/OtlpConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0. | ||
*/ | ||
package io.holoinsight.server.otlp.server; | ||
|
||
import org.springframework.boot.context.properties.bind.Binder; | ||
|
||
import com.xzchaoo.commons.basic.config.spring.AbstractConfig; | ||
|
||
import lombok.Data; | ||
import lombok.Getter; | ||
|
||
/** | ||
* <p> | ||
* created at 2024/4/8 | ||
* | ||
* @author xzchaoo | ||
*/ | ||
@Getter | ||
public class OtlpConfig extends AbstractConfig { | ||
private volatile Trace trace = new Trace(); | ||
|
||
@Override | ||
protected void refresh(Binder binder) { | ||
binder.bind("otlp.trace", Trace.class).ifBound(x -> trace = x); | ||
} | ||
|
||
@Data | ||
public static class Trace { | ||
/** | ||
* If false, the processing of trace data will be skipped. | ||
*/ | ||
private boolean enabled = true; | ||
} | ||
|
||
} |