Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

Commit

Permalink
use withMetricTag instead of withTag for correct trace visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsoft committed Jan 22, 2018
1 parent f6e8aaa commit 3732c9a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@ Supported releases and dependencies are shown below.

| kamon-play-2.4 | status | jdk | scala
|:------:|:------:|:----:|------------------
| 1.0.0 | stable | 1.7+, 1.8+ | 2.10, 2.11
| 1.0.1 | stable | 1.7+, 1.8+ | 2.10, 2.11

| kamon-play-2.5 | status | jdk | scala
|:------:|:------:|:----:|------------------
| 1.0.0 | stable | 1.7+, 1.8+ | 2.11
| 1.0.1 | stable | 1.7+, 1.8+ | 2.11

| kamon-play-2.6 | status | jdk | scala
|:------:|:------:|:----:|------------------
| 1.0.0 | stable | 1.8+ | 2.12
| 1.0.1 | stable | 1.8+ | 2.12


To get started with SBT, simply add the following to your `build.sbt` or `pom.xml`
file:

```scala
libraryDependencies += "io.kamon" %% "kamon-play-[play-version]" % "1.0.0"
libraryDependencies += "io.kamon" %% "kamon-play-[play-version]" % "1.0.1"
```

```xml
<dependency>
<groupId>io.kamon</groupId>
<artifactId>kamon-play-[play-version]_2.12</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
```
[base functionality]: http://kamon.io/integrations/web-and-http-toolkits/base-functionality/
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class RequestHandlerInstrumentation {
val incomingContext = decodeContext(request)
val serverSpan = Kamon.buildSpan("unknown-operation")
.asChildOf(incomingContext.get(Span.ContextKey))
.withTag("span.kind", "server")
.withMetricTag("span.kind", "server")
.withTag("component", "play.server.netty")
.withTag("http.method", request.getMethod.getName)
.withTag("http.url", request.getUri)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class WSInstrumentation {
else {
val clientSpanBuilder = Kamon.buildSpan(Play.generateHttpClientOperationName(request))
.asChildOf(clientSpan)
.withTag("span.kind", "client")
.withMetricTag("span.kind", "client")
.withTag("component", "play.client.ws")
.withTag("http.method", request.method)
.withTag("http.url", request.uri.toString)
Expand Down Expand Up @@ -75,4 +75,4 @@ class WSInstrumentation {
)(CallingThreadExecutionContext)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class RequestHandlerInstrumentation {
val incomingContext = decodeContext(request)
val serverSpan = Kamon.buildSpan("unknown-operation")
.asChildOf(incomingContext.get(Span.ContextKey))
.withTag("span.kind", "server")
.withMetricTag("span.kind", "server")
.withTag("component", "play.server.netty")
.withTag("http.method", request.getMethod.name())
.withTag("http.url", request.getUri)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class WSInstrumentation {
else {
val clientSpanBuilder = Kamon.buildSpan(Play.generateHttpClientOperationName(request))
.asChildOf(clientSpan)
.withTag("span.kind", "client")
.withMetricTag("span.kind", "client")
.withTag("component", "play.client.ws")
.withTag("http.method", request.method)
.withTag("http.url", request.uri.toString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class RequestHandlerInstrumentation {
val incomingContext = decodeContext(request)
val serverSpan = Kamon.buildSpan("unknown-operation")
.asChildOf(incomingContext.get(Span.ContextKey))
.withTag("span.kind", "server")
.withMetricTag("span.kind", "server")
.withTag("component", "play.server")
.withTag("http.method", request.method.value)
.withTag("http.url", request.getUri.toString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class WSInstrumentation {
else {
val clientSpanBuilder = Kamon.buildSpan(Play.generateHttpClientOperationName(request))
.asChildOf(clientSpan)
.withTag("span.kind", "client")
.withMetricTag("span.kind", "client")
.withTag("component", "play.client.ws")
.withTag("http.method", request.method)
.withTag("http.url", request.uri.toString)
Expand Down

0 comments on commit 3732c9a

Please sign in to comment.