Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package datadog.trace.instrumentation.springwebflux.client;

import static datadog.trace.api.KnownTags.EVENT;
import static datadog.trace.api.KnownTags.MESSAGE;

import datadog.trace.bootstrap.instrumentation.api.AgentSpan;
import datadog.trace.bootstrap.instrumentation.api.UTF8BytesString;
import datadog.trace.bootstrap.instrumentation.decorator.HttpClientDecorator;
Expand All @@ -21,8 +24,8 @@ public class SpringWebfluxHttpClientDecorator
public static final CharSequence HTTP_REQUEST = UTF8BytesString.create(DECORATE.operationName());

public void onCancel(final AgentSpan span) {
span.setTag("event", CANCELLED);
span.setTag("message", CANCELLED_MESSAGE);
span.setTag(EVENT, CANCELLED);
span.setTag(MESSAGE, CANCELLED_MESSAGE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package datadog.trace.instrumentation.springwebflux.server;

import static datadog.trace.api.KnownTags.HANDLER_TYPE;
import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.activateSpan;
import static datadog.trace.bootstrap.instrumentation.api.Java8BytecodeBridge.spanFromScope;
import static datadog.trace.bootstrap.instrumentation.decorator.http.HttpResourceDecorator.HTTP_RESOURCE_DECORATOR;
Expand Down Expand Up @@ -44,7 +45,7 @@ public static ContextScope methodEnter(
}

span.setSpanName(operationName);
span.setTag("handler.type", handlerType);
span.setTag(HANDLER_TYPE, handlerType);

scope = activateSpan(span);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package datadog.trace.instrumentation.springwebflux.server;

import static datadog.trace.api.KnownTags.REQUEST_PREDICATE;
import static datadog.trace.bootstrap.instrumentation.decorator.http.HttpResourceDecorator.HTTP_RESOURCE_DECORATOR;

import datadog.trace.api.cache.DDCache;
Expand Down Expand Up @@ -69,7 +70,7 @@ public void accept(HandlerFunction<?> handlerFunction) {
if (predicateString != null) {
final AgentSpan span = (AgentSpan) serverRequest.attributes().get(AdviceUtils.SPAN_ATTRIBUTE);
if (span != null) {
span.setTag("request.predicate", predicateString);
span.setTag(REQUEST_PREDICATE, predicateString);
}
final AgentSpan parentSpan =
(AgentSpan) serverRequest.attributes().get(AdviceUtils.PARENT_SPAN_ATTRIBUTE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package datadog.trace.instrumentation.springweb;

import static datadog.trace.api.KnownTags.VIEW_NAME;
import static datadog.trace.api.KnownTags.VIEW_TYPE;
import static datadog.trace.api.Pair.of;
import static datadog.trace.bootstrap.instrumentation.decorator.http.HttpResourceDecorator.HTTP_RESOURCE_DECORATOR;

Expand Down Expand Up @@ -155,11 +157,11 @@ private String getMethodName(final Object handler) {
public void onRender(final AgentSpan span, final ModelAndView mv) {
final String viewName = mv.getViewName();
if (viewName != null) {
span.setTag("view.name", viewName);
span.setTag(VIEW_NAME, viewName);
span.setResourceName(viewName);
}
if (mv.getView() != null) {
span.setTag("view.type", className(mv.getView().getClass()));
span.setTag(VIEW_TYPE, className(mv.getView().getClass()));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package datadog.trace.instrumentation.springweb6;

import static datadog.trace.api.KnownTags.VIEW_NAME;
import static datadog.trace.api.KnownTags.VIEW_TYPE;
import static datadog.trace.api.Pair.of;
import static datadog.trace.bootstrap.instrumentation.decorator.http.HttpResourceDecorator.HTTP_RESOURCE_DECORATOR;

Expand Down Expand Up @@ -162,11 +164,11 @@ private String getMethodName(final Object handler) {
public void onRender(final AgentSpan span, final ModelAndView mv) {
final String viewName = mv.getViewName();
if (viewName != null) {
span.setTag("view.name", viewName);
span.setTag(VIEW_NAME, viewName);
span.setResourceName(viewName);
}
if (mv.getView() != null) {
span.setTag("view.type", className(mv.getView().getClass()));
span.setTag(VIEW_TYPE, className(mv.getView().getClass()));
}
}
}
Loading