Skip to content

The only tool you need to know what is happening and how to fix it.

3.9 KB
Raw Blame
{
  "resourceSpans": [
    {
      "resource": {
        "attributes": [
          {"key": "service.name", "value": {"stringValue": "user-service"}},
          {"key": "service.version", "value": {"stringValue": "2.1.0"}},
          {"key": "telemetry.sdk.name", "value": {"stringValue": "opentelemetry"}},
          {"key": "telemetry.sdk.language", "value": {"stringValue": "java"}},
          {"key": "telemetry.sdk.version", "value": {"stringValue": "1.44.0"}}
        ]
      },
      "scopeSpans": [
        {
          "scope": {"name": "io.opentelemetry.spring-webmvc-6.0", "version": "2.13.0-alpha"},
          "spans": [
            {
              "traceId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
              "spanId": "1122334455667788",
              "name": "GET /api/users/{id}",
              "kind": "SPAN_KIND_SERVER",
              "startTimeUnixNano": "1700000000000000000",
              "endTimeUnixNano": "1700000000150000000",
              "attributes": [
                {"key": "http.request.method", "value": {"stringValue": "GET"}},
                {"key": "http.route", "value": {"stringValue": "/api/users/{id}"}},
                {"key": "http.response.status_code", "value": {"intValue": "500"}},
                {"key": "url.path", "value": {"stringValue": "/api/users/99999"}},
                {"key": "server.address", "value": {"stringValue": "localhost"}},
                {"key": "server.port", "value": {"intValue": "8080"}},
                {"key": "network.protocol.version", "value": {"stringValue": "1.1"}},
                {"key": "user_agent.original", "value": {"stringValue": "PostmanRuntime/7.32.3"}}
              ],
              "events": [
                {
                  "timeUnixNano": "1700000000140000000",
                  "name": "exception",
                  "attributes": [
                    {"key": "exception.type", "value": {"stringValue": "org.springframework.dao.EmptyResultDataAccessException"}},
                    {"key": "exception.message", "value": {"stringValue": "Incorrect result size: expected 1, actual 0"}},
                    {"key": "exception.stacktrace", "value": {"stringValue": "org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0\n\tat org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:90)\n\tat com.example.userservice.repository.UserRepository.findById(UserRepository.java:42)\n\tat com.example.userservice.service.UserService.getUser(UserService.java:38)\n\tat com.example.userservice.controller.UserController.getUser(UserController.java:28)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:568)\n\t... 52 more"}},
                    {"key": "exception.escaped", "value": {"boolValue": true}}
                  ]
                }
              ],
              "status": {"code": "STATUS_CODE_ERROR", "message": "Incorrect result size: expected 1, actual 0"}
            }
          ]
        },
        {
          "scope": {"name": "io.opentelemetry.jdbc", "version": "2.13.0-alpha"},
          "spans": [
            {
              "traceId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
              "spanId": "aabbccddeeff0011",
              "parentSpanId": "1122334455667788",
              "name": "SELECT users",
              "kind": "SPAN_KIND_CLIENT",
              "startTimeUnixNano": "1700000000050000000",
              "endTimeUnixNano": "1700000000130000000",
              "attributes": [
                {"key": "db.system", "value": {"stringValue": "postgresql"}},
                {"key": "db.operation.name", "value": {"stringValue": "SELECT"}},
                {"key": "db.sql.table", "value": {"stringValue": "users"}},
                {"key": "db.query.text", "value": {"stringValue": "SELECT id, email, name FROM users WHERE id = ?"}}
              ],
              "status": {}
            }
          ]
        }
      ]
    }
  ]
}