From 77d9d5bfdf628d2d4b0aca48f623e28c4907f391 Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Tue, 24 Oct 2023 11:54:09 +0200 Subject: [PATCH] Update changelog, small doc and name changes --- CHANGELOG.asciidoc | 2 +- .../main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java | 2 +- .../java/co/elastic/apm/agent/impl/TracerConfiguration.java | 4 ++-- .../apm/agent/impl/transaction/PropagationOnlyContext.java | 2 +- .../co/elastic/apm/agent/objectpool/ObjectPoolFactory.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index bd58d283fc..e239e30269 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -33,7 +33,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes: [float] ===== Features -* Context propagation and log correlation now takes place even if recording is disabled - {pull}3358[#3358] +* Added `context_propagation_only` configuration option - {pull}3358[#3358] [float] ===== Bug fixes diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java index f1d485e942..05c6e59d19 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java @@ -225,7 +225,7 @@ public void onChange(ConfigurationOption configurationOption, Boolean oldValu this.objectPoolFactory = poolFactory; transactionPool = poolFactory.createTransactionPool(maxPooledElements, this); - propagationOnlyContextPool = poolFactory.createRemoteParentContextPool(maxPooledElements, this); + propagationOnlyContextPool = poolFactory.createPropagationOnlyContextPool(maxPooledElements, this); spanPool = poolFactory.createSpanPool(maxPooledElements, this); // we are assuming that we don't need as many errors as spans or transactions diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/TracerConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/TracerConfiguration.java index 3531a8a6e0..1a8394a36e 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/TracerConfiguration.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/TracerConfiguration.java @@ -35,9 +35,9 @@ public class TracerConfiguration extends ConfigurationOptionProvider { "\n" + "A boolean specifying if the agent should be recording or not.\n" + "When recording, the agent instruments incoming HTTP requests, tracks errors and collects and sends metrics.\n" + - "When not recording, the agent works almost as a noop, not collecting data and not communicating with the APM sever,\n" + + "When not recording, the agent works as a noop, not collecting data and not communicating with the APM sever,\n" + "except for polling the central configuration endpoint.\n" + - "Note that trace context propagation, baggage and log correlation remain active even when recording is disabled.\n"+ + "Note that trace context propagation, baggage and log correlation will also be disabled when recording is disabled.\n"+ "As this is a reversible switch, agent threads are not being killed when inactivated, but they will be \n" + "mostly idle in this state, so the overhead should be negligible.\n" + "\n" + diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/PropagationOnlyContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/PropagationOnlyContext.java index 6a908607f6..fac678b75e 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/PropagationOnlyContext.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/PropagationOnlyContext.java @@ -89,6 +89,6 @@ protected void recycle() { @Override public String toString() { - return String.format("RemoteParentContext %s (%s)", remoteTraceParent, Integer.toHexString(System.identityHashCode(this))); + return String.format("PropagationOnlyContext %s (%s)", remoteTraceParent, Integer.toHexString(System.identityHashCode(this))); } } diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/objectpool/ObjectPoolFactory.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/objectpool/ObjectPoolFactory.java index 82fa4078bd..28b34360b9 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/objectpool/ObjectPoolFactory.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/objectpool/ObjectPoolFactory.java @@ -75,7 +75,7 @@ public Transaction createInstance() { }); } - public ObjectPool createRemoteParentContextPool(int maxCapacity, final ElasticApmTracer tracer) { + public ObjectPool createPropagationOnlyContextPool(int maxCapacity, final ElasticApmTracer tracer) { return createRecyclableObjectPool(maxCapacity, new Allocator() { @Override public PropagationOnlyContext createInstance() {