# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

segmentItems:
  - serviceName: micronaut-scenario-8080
    segmentSize: ge 4
    segments:
      - segmentId: not null
        spans:
          - operationName: GET:/micronaut/success
            operationId: 0
            parentSpanId: -1
            spanId: 0
            spanLayer: Http
            startTime: gt 0
            endTime: gt 0
            componentId: 131
            isError: false
            spanType: Exit
            peer: localhost:8081
            skipAnalysis: false
            tags:
              - {key: http.method, value: GET}
              - {key: url, value: 'http://localhost:8081/micronaut/success'}
              - {key: http.params, value: a=1&b=2}
              - {key: http.status_code, value: '200'}
            refs:
              - {parentEndpoint: 'GET:/micronaut/start', networkAddress: '', refType: CrossThread,
                 parentSpanId: 0, parentTraceSegmentId: not null,
                 parentServiceInstance: not null, parentService: micronaut-scenario-8080,
                 traceId: not null}
      - segmentId: not null
        spans:
          - operationName: GET:/micronaut/404
            operationId: 0
            parentSpanId: -1
            spanId: 0
            spanLayer: Http
            startTime: gt 0
            endTime: gt 0
            componentId: 131
            isError: true
            spanType: Exit
            peer: localhost:8081
            skipAnalysis: false
            tags:
              - {key: http.method, value: GET}
              - {key: url, value: 'http://localhost:8081/micronaut/404'}
            logs:
              - logEvent:
                  - {key: event, value: error}
                  - {key: error.kind, value: io.micronaut.http.client.exceptions.HttpClientResponseException}
                  - {key: message, value: Not Found}
                  - {key: stack,value: not null}
            refs:
              - {parentEndpoint: 'GET:/micronaut/start', networkAddress: '', refType: CrossThread,
                 parentSpanId: 0, parentTraceSegmentId: not null,
                 parentServiceInstance: not null, parentService: micronaut-scenario-8080,
                 traceId: not null}
      - segmentId: not null
        spans:
          - operationName: GET:/micronaut/error
            operationId: 0
            parentSpanId: -1
            spanId: 0
            spanLayer: Http
            startTime: gt 0
            endTime: gt 0
            componentId: 131
            isError: true
            spanType: Exit
            peer: localhost:8081
            skipAnalysis: false
            tags:
              - {key: http.method, value: GET}
              - {key: url, value: 'http://localhost:8081/micronaut/error'}
            logs:
              - logEvent:
                  - {key: event, value: error}
                  - {key: error.kind, value: io.micronaut.http.client.exceptions.HttpClientResponseException}
                  - {key: message, value: not null}
                  - {key: stack,value: not null}
            refs:
              - {parentEndpoint: 'GET:/micronaut/start', networkAddress: '', refType: CrossThread,
                 parentSpanId: 0, parentTraceSegmentId: not null,
                 parentServiceInstance: not null, parentService: micronaut-scenario-8080,
                 traceId: not null}
      - segmentId: not null
        spans:
          - operationName: GET:/micronaut/start
            operationId: 0
            parentSpanId: -1
            spanId: 0
            spanLayer: Http
            startTime: gt 0
            endTime: gt 0
            componentId: 131
            isError: false
            spanType: Entry
            peer: ''
            skipAnalysis: false
            tags:
              - {key: url, value: 'http://localhost:8080/micronaut/start'}
              - {key: http.method, value: GET}
              - {key: http.status_code, value: '200'}
  - serviceName: micronaut-scenario-8081
    segmentSize: 3
    segments:
      - segmentId: not null
        spans:
          - operationName: GET:/micronaut/success
            operationId: 0
            parentSpanId: -1
            spanId: 0
            spanLayer: Http
            startTime: gt 0
            endTime: gt 0
            componentId: 131
            isError: false
            spanType: Entry
            peer: ''
            skipAnalysis: false
            tags:
              - {key: url, value: 'http://localhost:8081/micronaut/success'}
              - {key: http.method, value: GET}
              - {key: http.params, value: a=1&b=2}
              - {key: http.status_code, value: '200'}
            refs:
              - {parentEndpoint: 'GET:/micronaut/success', networkAddress: 'localhost:8081',
                 refType: CrossProcess, parentSpanId: 0, parentTraceSegmentId: not null,
                 parentServiceInstance: not null, parentService: micronaut-scenario-8080,
                 traceId: not null}
      - segmentId: not null
        spans:
          - operationName: GET:/micronaut/404
            operationId: 0
            parentSpanId: -1
            spanId: 0
            spanLayer: Http
            startTime: gt 0
            endTime: gt 0
            componentId: 131
            isError: true
            spanType: Entry
            peer: ''
            skipAnalysis: false
            tags:
              - {key: url, value: 'http://localhost:8081/micronaut/404'}
              - {key: http.method, value: GET}
              - {key: http.status_code, value: '404'}
            refs:
              - {parentEndpoint: 'GET:/micronaut/404', networkAddress: 'localhost:8081', refType: CrossProcess,
                 parentSpanId: 0, parentTraceSegmentId: not null,
                 parentServiceInstance: not null, parentService: micronaut-scenario-8080,
                 traceId: not null}
      - segmentId: not null
        spans:
          - operationName: GET:/micronaut/error
            operationId: 0
            parentSpanId: -1
            spanId: 0
            spanLayer: Http
            startTime: gt 0
            endTime: gt 0
            componentId: 131
            isError: true
            spanType: Entry
            peer: ''
            skipAnalysis: false
            tags:
              - {key: url, value: 'http://localhost:8081/micronaut/error'}
              - {key: http.method, value: GET}
              - {key: http.status_code, value: '500'}
            refs:
              - {parentEndpoint: 'GET:/micronaut/error', networkAddress: 'localhost:8081',
                 refType: CrossProcess, parentSpanId: 0, parentTraceSegmentId: not null,
                 parentServiceInstance: not null, parentService: micronaut-scenario-8080,
                 traceId: not null}