# Creating spans using Elastic APM bridge

**URL:** <https://discuss.elastic.co/t/creating-spans-using-elastic-apm-bridge/208614>\
**Category:** APM\
**Tags:** java\
**Created:** [November 20, 2019, 5:40am UTC](https://discuss.elastic.co/t/creating-spans-using-elastic-apm-bridge/208614 "2019-11-20T05:40:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)\
**Post date:** [November 20, 2019, 5:40am UTC](https://discuss.elastic.co/t/creating-spans-using-elastic-apm-bridge/208614/1 "2019-11-20T05:40:36Z")

</div>

**Kibana version** : 7.3.2

**Elasticsearch version** : 7.3.2

**APM Server version** : 7.3.2

**APM Agent language and version** : java 1.9.0

**Fresh install or upgraded from other version?** fresh install

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. :-----No

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)** :

**Steps to reproduce** :

I have created Spans using Elastic apm bridge. I have many parent child Spans. I would like to figure out if we can distinguish the spans based on the span type. I see that the APM bridge does not support any "span type". Any other way that I can figure out in Kibana or where we can specify extra data about the spans so that one can see more info about the span. I see that the label and tags(span.tag) are available in Elastic API but the tracing bridge does not have support for that.

basically if a span is of type "Rule" and other span is of type "Choice" . I can display the RULE span and Choice span , but I cannot figure out if its a type rule or choice . Any inputs on how to achieve this using APM bridge

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [November 20, 2019, 3:41pm UTC](https://discuss.elastic.co/t/creating-spans-using-elastic-apm-bridge/208614/2 "2019-11-20T15:41:04Z")

</div>

Yes, that's possible. See also [https://www.elastic.co/guide/en/apm/agent/java/current/opentracing-bridge.html#elastic-apm-tags](https://www.elastic.co/guide/en/apm/agent/java/current/opentracing-bridge.html#elastic-apm-tags)

There are constants for these special tags in `co.elastic.apm.opentracing.ElasticApmTags`.

---

<div class="post-metadata">

**Author:** ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)\
**Post date:** [November 20, 2019, 5:11pm UTC](https://discuss.elastic.co/t/creating-spans-using-elastic-apm-bridge/208614/3 "2019-11-20T17:11:29Z")

</div>

Thanks for the reply . The link that you shared is not supported by open tracing correct ? I have to use the open tracing package that you have provided correct ?

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [November 21, 2019, 8:19am UTC](https://discuss.elastic.co/t/creating-spans-using-elastic-apm-bridge/208614/4 "2019-11-21T08:19:13Z")

</div>

The `co.elastic.apm.opentracing.ElasticApmTags` class is Elastic APM specific and included in the `co.elastic.apm:apm-opentracing` artifact.

However, you can also just use the plain string to set the type. For example: `span.setTag("type", "Rule");`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 12, 2019, 4:22am UTC](https://discuss.elastic.co/t/creating-spans-using-elastic-apm-bridge/208614/5 "2019-12-12T04:22:37Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
