Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

spanName showing up as 'unknown' in New Relic when property exists #15

@cmanzi

Description

@cmanzi

Describe the bug
If I understand the tracespan template correctly, the following property should determine the 'name' of the trace span that shows up in New Relic:

...
spanName: destination.workload.name | destination.service.name | "unknown"
...

This appears to be the case for most of my spans. I am running a multicluster setup, and I have spans that cross cluster boundaries. So, the 'destination' for the initial request in these spans is actually a ServiceEntry.

If I search for spans by the desired destination name (productpage.bookinfo.mvp.global in this case, I can see all of the unique spans, and they appear to be correct. However, the 'name' that they are assigned is 'unknown'. This is a bit puzzling, because according to the tags that are populated, I would think that the spanName would have defaulted to destination.service.name, as destination.workload.name is unknown:

...
destination.ip
10.61.24.129
destination.name
unknown
destination.owner
unknown
destination.port
15443
destination.service.name
productpage.bookinfo.mvp.global
destination.service.namespace
generator
destination.workload.name
unknown
...

It may be the case that I just don't understand how exactly New Relic determines what the name of a span should be.

To Reproduce
Steps to reproduce the behavior:

  1. Set up Istio in a cluster (1.4.3) with the newrelic adapter
  2. Create a ServiceEntry for a MESH_INTERNAL service (from what I understand about this issue, I don't think this needs to be done in a multi-cluster setup). This is the ServiceEntry I am using:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: productpage-mvp
spec:
  hosts:
  # must be of form name.namespace.global
  - productpage.bookinfo.mvp.global
  location: MESH_INTERNAL
  ports:
  - name: http1
    number: 9080
    protocol: http
  resolution: DNS
  addresses:
  - 240.0.100.1
  endpoints:
  - address: mvp.<internal_domain>
    ports:
      http1: 15443 # Do not change this port value
  1. Generate requests to the service entry and observe spans that populate in New Relic.

Expected behavior
Span names are correctly set to the destination.service.name property.

Version information (please complete the following information):

  • newrelic-istio-adapter: 2.0.1
  • Kubernetes: 1.15.7
  • Istio: 1.4.3

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions