Skip to content

Commit 0d5df72

Browse files
authored
Align dynamic config API to kibana send* config options (#650)
* Align dynamic config API to kibana send* config options * change to setSending*()
1 parent 91b3a3b commit 0d5df72

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

custom/src/main/java/co/elastic/otel/dynamicconfig/DynamicConfiguration.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,30 @@ private void initSendingStates() {
8484
}
8585
}
8686

87+
/** Can be executed repeatedly regardless of the current state */
88+
public void setSendingSpans(boolean send) {
89+
initSendingStates();
90+
if (recoverySendSpansState != null) {
91+
BlockableSpanExporter.getInstance().setSendingSpans(send);
92+
}
93+
}
94+
95+
/** Can be executed repeatedly regardless of the current state */
96+
public void setSendingMetrics(boolean send) {
97+
initSendingStates();
98+
if (recoverySendMetricsState != null) {
99+
BlockableMetricExporter.getInstance().setSendingMetrics(send);
100+
}
101+
}
102+
103+
/** Can be executed repeatedly regardless of the current state */
104+
public void setSendingLogs(boolean send) {
105+
initSendingStates();
106+
if (recoverySendLogsState != null) {
107+
BlockableLogRecordExporter.getInstance().setSendingLogs(send);
108+
}
109+
}
110+
87111
/** Can be executed repeatedly even if sending is currently stopped */
88112
public void stopAllSending() {
89113
initSendingStates();

0 commit comments

Comments
 (0)