Unverified Commit 32202e05 authored by kezhenxu94's avatar kezhenxu94 Committed by GitHub
Browse files

BugFix: x-le tag format in GraphQL plugin (#5054)

parent 42c8cebb
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInt
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {

@@ -71,8 +69,6 @@ public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {
    }

    private String buildLogicEndpointSpan() {
        Map<String, Object> logicEndpointSpan = new HashMap<>();
        logicEndpointSpan.put("logic-span", true);
        return logicEndpointSpan.toString();
        return "{\"logic-span\":true}";
    }
}
+2 −6
Original line number Diff line number Diff line
@@ -30,8 +30,6 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {

@@ -102,8 +100,6 @@ public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {
    }

    private String buildLogicEndpointSpan() {
        Map<String, Object> logicEndpointSpan = new HashMap<>();
        logicEndpointSpan.put("logic-span", true);
        return logicEndpointSpan.toString();
        return "{\"logic-span\":true}";
    }
}
+2 −6
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInt
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {

@@ -71,8 +69,6 @@ public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {
    }

    private String buildLogicEndpointSpan() {
        Map<String, Object> logicEndpointSpan = new HashMap<>();
        logicEndpointSpan.put("logic-span", true);
        return logicEndpointSpan.toString();
        return "{\"logic-span\":true}";
    }
}
+4 −4
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ segmentItems:
      peer: ''
      skipAnalysis: false
      tags:
      - {key: x-le, value: '{logic-span=true}'}
      - {key: x-le, value: '{"logic-span":true}'}
    - operationName: users
      operationId: 0
      parentSpanId: 0
@@ -46,7 +46,7 @@ segmentItems:
      peer: ''
      skipAnalysis: false
      tags:
      - {key: x-le, value: '{logic-span=true}'}
      - {key: x-le, value: '{"logic-span":true}'}
    - operationName: user
      operationId: 0
      parentSpanId: 0
@@ -60,7 +60,7 @@ segmentItems:
      peer: ''
      skipAnalysis: false
      tags:
      - {key: x-le, value: '{logic-span=true}'}
      - {key: x-le, value: '{"logic-span":true}'}
    - operationName: users
      operationId: 0
      parentSpanId: 0
@@ -74,7 +74,7 @@ segmentItems:
      peer: ''
      skipAnalysis: false
      tags:
      - {key: x-le, value: '{logic-span=true}'}
      - {key: x-le, value: '{"logic-span":true}'}
    - operationName: /graphql-scenario/case/graphql
      operationId: 0
      parentSpanId: -1
+4 −4
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ segmentItems:
      peer: ''
      skipAnalysis: false
      tags:
      - {key: x-le, value: '{logic-span=true}'}
      - {key: x-le, value: '{"logic-span":true}'}
    - operationName: users
      operationId: 0
      parentSpanId: 0
@@ -46,7 +46,7 @@ segmentItems:
      peer: ''
      skipAnalysis: false
      tags:
      - {key: x-le, value: '{logic-span=true}'}
      - {key: x-le, value: '{"logic-span":true}'}
    - operationName: user
      operationId: 0
      parentSpanId: 0
@@ -60,7 +60,7 @@ segmentItems:
      peer: ''
      skipAnalysis: false
      tags:
      - {key: x-le, value: '{logic-span=true}'}
      - {key: x-le, value: '{"logic-span":true}'}
    - operationName: users
      operationId: 0
      parentSpanId: 0
@@ -74,7 +74,7 @@ segmentItems:
      peer: ''
      skipAnalysis: false
      tags:
      - {key: x-le, value: '{logic-span=true}'}
      - {key: x-le, value: '{"logic-span":true}'}
    - operationName: /graphql-scenario/case/graphql
      operationId: 0
      parentSpanId: -1
Loading