Want to use OpenTelemetry instead? Read these docs to get started!
If your app is written in Java, you can get started quickly with Cloud Observability. Download the Java SpecialAgent, then configure it to communicate with your Cloud Observability Microsatellites. When you deploy your app, all supported third-party framework libraries (like the Elasticsearch client, RxJava, or the Kafka client) will begin sending trace data to Cloud Observability.
To ensure you can access all Cloud Observability functionality, including infrastructure metrics reporting, update the SpecialAgent to the latest release. To update, simply follow the instructions for installing the SpecialAgent. No code changes are needed.
Installation can be static or dynamic, allowing you to install without requiring the application’s source code to be modified or re-compiled.
Java versions 1.7 or later are supported.
Download the JAR file from Maven.
To send data from your system to Cloud Observability, you need to configure the agent to point to your Microsatellites.
To configure the agent:
Start tabs
On-Premise Microsatellites
1
2
3
4
5
6
7
8
9
10
# Options for On Premise Microsatellites
-Dsa.exporter=lightstep
-Dls.collectorHost=$(your_load_balancer_DNS_name_or_IP_address)
-Dls.collectorProtocol=$(your_satellite_protocol)
-Dls.collectorPort=$(your_satellite_port)
-Dls.accessToken=$(your_Cloud Observability_token)
-Dls.componentName=${your_service_name}
-Dls.propagator=b3
-Dls.tags="environment=qa-21,version=0.0.201"
Public Microsatellites
1
2
3
4
5
6
7
8
9
10
# Options for Cloud Observability Public Microsatellites
-Dsa.exporter=lightstep
-Dls.collectorHost=ingest.lightstep.com
-Dls.collectorProtocol=https
-Dls.collectorPort=443
-Dls.accessToken=$(your_Cloud Observability_token)
-Dls.componentName=${your_service_name}
-Dls.propagator=b3
-Dls.tags="environment=qa-21,version=0.0.201"
Developer Mode
1
2
3
4
5
6
7
8
9
10
# Options for Cloud Observability Public Microsatellites
-Dsa.exporter=lightstep
-Dls.collectorHost=localhost
-Dls.collectorProtocol=https
-Dls.collectorPort=8360
-Dls.accessToken=$developer
-Dls.componentName=${your_service_name}
-Dls.propagator=b3
-Dls.tags="environment=qa-21,version=0.0.201"
End code tabs
Note the following:
tags
variable allows you to set global tags on all traces.You can install the agent statically (you will need to restart your app) or dynamically (you can install while the app is running).
For a static attach, use the -javaagent
argument to start up your app.
1
2
3
4
java <application_name>
<options>
-javaagent:$(full_path_to_special_agent_jar)
-jar $(full_path_to_your_jar_file)
For a dynamic attach, you need to determine your application’s PID
and then attach the agent.
Run jps
in a shell to get your PID.
Make sure the SpecialAgent version is correct for your installation.
JDK 1.9 and later:
1
-jar opentracing-specialagent-<version>.jar <PID>
JDK 1.8:
1
2
-Xbootclasspath/a:$JAVA_HOME/lib/tools.jar
-jar opentracing-specialagent-<version>.jar <PID>
All supported OpenTracing plugins are now installed! If you did a dynamic attachment and the third-party apps that have plugins are running, you’ll immediately start to see spans in Cloud Observability. If you did a static attach, you’ll get spans as soon as your apps are all running.
Read the next section to learn how to configure SpecialAgent to tune the amount of data sent.
Java SpecialAgent supports many plugins out of the box. You can add the following additional configuration properties on the command line for plugin configuration.
By default, all plugins except Concurrent have this property set to false.
To set all plugins to true:-Dsa.instrumentation.plugins.verbose=true
Or to set individual plugins to true: -Dsa.instrumentation.plugin.${RULE_NAME_PATTERN}.verbose=true
The ${RULE_NAME_PATTERN}
is the artifactId of the plugin, and is shown in the table, below.
All plugins are installed by default. You can disable any you don’t need:-Dsa.instrumentation.plugin.${RULE_NAME_PATTERN}.disable
The ${RULE_NAME_PATTERN}
is the artifactId of the plugin, and is shown in the table, below.
All plugins are installed by default. If you’ve disabled a plugin, you can re-enable it: -Dsa.instrumentation.plugin.${RULE_NAME_PATTERN}.enable
The ${RULE_NAME_PATTERN}
is the artifactId of the plugin, and is shown in the table, below.
Following are the supported plugins that are auto-instrumented when you run your app.
Java Manual Instrumentation with OpenTracing
Measure your instrumentation quality
Updated Mar 3, 2020