Skip to content

Commit

Permalink
Minor fixes, updated docs and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKunz committed Oct 13, 2023
1 parent eb8667a commit 83b0e36
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
=== Unreleased
[float]
===== Features
* Context propagation and log correlation now takes place even if recording is disabled - {pull}3358[#3358]
[float]
===== Bug fixes
* Fixed too many spans being created for `HTTPUrlConnection` requests with method `HEAD` - {pull}3353[#3353]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public Span startSpan(AbstractSpan<?> parent, Baggage baggage, long epochMicros)
public RemoteParentContext createRemoteParentContext() {
RemoteParentContext ctx = remoteParentContextPool.createInstance();
while (ctx.getReferenceCount() != 0) {
logger.warn("Tried to start a span with a non-zero reference count {} {}", ctx.getReferenceCount(), ctx);
logger.warn("Tried to start a remote-context with a non-zero reference count {} {}", ctx.getReferenceCount(), ctx);
ctx = remoteParentContextPool.createInstance();
}
return ctx;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +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 as a noop, not collecting data and not communicating with the APM sever,\n" +
"When not recording, the agent works almost 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"+
"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" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ public AbstractSpan<?> getSpan() {
return null;
}

@org.jetbrains.annotations.Nullable
@Nullable
@Override
public TraceContext getRemoteParent() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,9 @@ void run(final long now) {
for (MeterRegistry registry : currentlyReportableRegistries) {
registry.forEachMeter(meterConsumer);
}
if(tracer.isRunning()) {
logger.debug("Reporting {} meters", meterConsumer.meters.size());
for (JsonWriter serializedMetricSet : serializer.serialize(meterConsumer.meters, now * 1000)) {
reporter.reportMetrics(serializedMetricSet);
}
logger.debug("Reporting {} meters", meterConsumer.meters.size());
for (JsonWriter serializedMetricSet : serializer.serialize(meterConsumer.meters, now * 1000)) {
reporter.reportMetrics(serializedMetricSet);
}
}

Expand Down

0 comments on commit 83b0e36

Please sign in to comment.