Skip to content

Commit

Permalink
Fix TraceResponse format to match spec (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
agoallikmaa authored Mar 4, 2024
1 parent 62fe1ea commit a7ff7db
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Propagation/ServerTiming/src/ServerTimingPropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/
final class ServerTimingPropagator implements ResponsePropagator
{
const IS_SAMPLED = '1';
const NOT_SAMPLED = '0';
const IS_SAMPLED = '01';
const NOT_SAMPLED = '00';
const SUPPORTED_VERSION = '00';
const SERVER_TIMING = 'server-timing';
const TRACEPARENT = 'traceparent';
Expand Down
4 changes: 2 additions & 2 deletions src/Propagation/ServerTiming/tests/Unit/PropagatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class PropagatorTest extends TestCase
{
private const TRACE_ID = '5759e988bd862e3fe1be46a994272793';
private const SPAN_ID = '53995c3f42cd8ad8';
private const TRACERESPONSE_HEADER_SAMPLED = '00-5759e988bd862e3fe1be46a994272793-53995c3f42cd8ad8-1';
private const TRACERESPONSE_HEADER_NOT_SAMPLED = '00-5759e988bd862e3fe1be46a994272793-53995c3f42cd8ad8-0';
private const TRACERESPONSE_HEADER_SAMPLED = '00-5759e988bd862e3fe1be46a994272793-53995c3f42cd8ad8-01';
private const TRACERESPONSE_HEADER_NOT_SAMPLED = '00-5759e988bd862e3fe1be46a994272793-53995c3f42cd8ad8-00';

/**
* @test
Expand Down
4 changes: 2 additions & 2 deletions src/Propagation/TraceResponse/src/TraceResponsePropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/
final class TraceResponsePropagator implements ResponsePropagator
{
const IS_SAMPLED = '1';
const NOT_SAMPLED = '0';
const IS_SAMPLED = '01';
const NOT_SAMPLED = '00';
const SUPPORTED_VERSION = '00';
const TRACERESPONSE = 'traceresponse';

Expand Down
4 changes: 2 additions & 2 deletions src/Propagation/TraceResponse/tests/Unit/PropagatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class PropagatorTest extends TestCase
{
private const TRACE_ID = '5759e988bd862e3fe1be46a994272793';
private const SPAN_ID = '53995c3f42cd8ad8';
private const TRACERESPONSE_HEADER_SAMPLED = '00-5759e988bd862e3fe1be46a994272793-53995c3f42cd8ad8-1';
private const TRACERESPONSE_HEADER_NOT_SAMPLED = '00-5759e988bd862e3fe1be46a994272793-53995c3f42cd8ad8-0';
private const TRACERESPONSE_HEADER_SAMPLED = '00-5759e988bd862e3fe1be46a994272793-53995c3f42cd8ad8-01';
private const TRACERESPONSE_HEADER_NOT_SAMPLED = '00-5759e988bd862e3fe1be46a994272793-53995c3f42cd8ad8-00';

/**
* @test
Expand Down

0 comments on commit a7ff7db

Please sign in to comment.