# 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.

debuggingtrace: null
retrievedtimerange:
  {{- with .retrievedtimerange }}
  starttime: {{ gt .starttime 0 }}
  endtime: {{ gt .endtime 0 }}
  {{- end }}
traces:
  {{- contains .traces }}
- spans:
  {{- contains .spans }}
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 0
    parentspanid: -1
    refs: []
    servicecode: e2e-service-consumer
    serviceinstancename: consumer1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: POST:/users
    type: Entry
    peer: ""
    component: Tomcat
    iserror: false
    layer: Http
    tags:
      {{- contains .tags }}
      - key: url
        value: {{ notEmpty .value }}
      - key: http.method
        value: POST
      - key: http.status_code
        value: "200"
      {{- end }}
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 1
    parentspanid: 0
    refs: []
    servicecode: e2e-service-consumer
    serviceinstancename: consumer1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: /users
    type: Exit
    peer: provider:9090
    component: SpringRestTemplate
    iserror: false
    layer: Http
    tags:
      {{- contains .tags }}
      - key: url
        value: {{ notEmpty .value }}
      - key: http.method
        value: POST
      - key: http.status_code
        value: "200"
      {{- end }}
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 0
    parentspanid: -1
    refs:
      {{- contains .refs }}
      - traceid: {{ notEmpty .traceid }}
        parentsegmentid: {{ .parentsegmentid }}
        parentspanid: 1
        type: CROSS_PROCESS
      {{- end }}
    servicecode: e2e-service-provider
    serviceinstancename: provider1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: POST:/users
    type: Entry
    peer: ""
    component: Tomcat
    iserror: false
    layer: Http
    tags:
      {{- contains .tags }}
      - key: url
        value: {{ notEmpty .value }}
      - key: http.method
        value: POST
      - key: http.status_code
        value: "200"
      {{- end }}
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 1
    parentspanid: 0
    refs: []
    servicecode: e2e-service-provider
    serviceinstancename: provider1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: HikariCP/Connection/getConnection
    type: Local
    peer: ""
    component: HikariCP
    iserror: false
    layer: Unknown
    tags: []
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 2
    parentspanid: 0
    refs: []
    servicecode: e2e-service-provider
    serviceinstancename: provider1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: H2/JDBC/PreparedStatement/executeQuery
    type: Exit
    peer: localhost:-1
    component: h2-jdbc-driver
    iserror: false
    layer: Database
    tags:
      - key: db.type
        value: H2
      - key: db.instance
        value: testdb
      - key: db.statement
        value: select user0_.id as id1_0_0_, user0_.name as name2_0_0_ from users user0_
          where user0_.id=?
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 3
    parentspanid: 0
    refs: []
    servicecode: e2e-service-provider
    serviceinstancename: provider1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: H2/JDBC/PreparedStatement/executeQuery
    type: Exit
    peer: localhost:-1
    component: h2-jdbc-driver
    iserror: false
    layer: Database
    tags:
      - key: db.type
        value: H2
      - key: db.instance
        value: testdb
      - key: db.statement
        value: call next value for hibernate_sequence
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 4
    parentspanid: 0
    refs: []
    servicecode: e2e-service-provider
    serviceinstancename: provider1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: H2/JDBC/PreparedStatement/executeUpdate
    type: Exit
    peer: localhost:-1
    component: h2-jdbc-driver
    iserror: false
    layer: Database
    tags:
      - key: db.type
        value: H2
      - key: db.instance
        value: testdb
      - key: db.statement
        value: insert into users (name, id) values (?, ?)
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 5
    parentspanid: 0
    refs: []
    servicecode: e2e-service-provider
    serviceinstancename: provider1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: H2/JDBC/Connection/commit
    type: Exit
    peer: localhost:-1
    component: h2-jdbc-driver
    iserror: false
    layer: Database
    tags:
      - key: db.type
        value: H2
      - key: db.instance
        value: testdb
      - key: db.statement
        value: ""
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 6
    parentspanid: 0
    refs: []
    servicecode: e2e-service-provider
    serviceinstancename: provider1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: H2/JDBC/Connection/commit
    type: Exit
    peer: localhost:-1
    component: h2-jdbc-driver
    iserror: false
    layer: Database
    tags:
      - key: db.type
        value: H2
      - key: db.instance
        value: testdb
      - key: db.statement
        value: ""
    logs: []
    attachedevents: []
  - traceid: {{ .traceid }}
    segmentid: {{ .segmentid }}
    spanid: 7
    parentspanid: 0
    refs: []
    servicecode: e2e-service-provider
    serviceinstancename: provider1
    starttime: {{ gt .starttime 0 }}
    endtime: {{ gt .endtime 0 }}
    endpointname: HikariCP/Connection/close
    type: Local
    peer: ""
    component: HikariCP
    iserror: false
    layer: Unknown
    tags: []
    logs: []
    attachedevents: []
  {{- end }}
  {{- end }}
