OpenTelemetry Collector
Troubleshoot issues related to the OpenTelemetry Collector.Export Debug Logging or to a File
If data is not arriving in Honeycomb as expected, add a debug-level logger to emit the data to the console for review. In the exporters section of your config file, add adebug exporter with verbosity of detailed.
The debug exporter should also be added to the service section, either replacing or accompanying the otlp exporter.
If the collector is running in Docker or otherwise difficult to parse via the console, you can also send the data to a specific file for review.
Add an additional file exporter with a path to the file that should contain the output.
This example includes an otlp exporter for sending to Honeycomb, a debug exporter for debug-level logging to the console, and a file exporter for storing the data logged.
CORS Errors
Sometimes a CORS error may occur when setting up browser telemetry. Confirm the receiver’s setup has the correct port defined. The default port forhttp is 4318.
If this port or endpoint is overwritten in the collector configuration file, ensure it matches the endpoint set in the application sending telemetry.
Confirm the allowed_origins list in the receivers matches the origin of the browser telemetry.
If there is a load balancer in front of the Collector, it should also be configured to accept requests from the browser origin.
One way to determine whether the issue is rooted in how the application is exporting as opposed to network connectivity is to issue a curl command to the server from the browser origin.
For example, if the application was running on http://localhost:3000, and the collector was listening on port 4318 at http://otel-collector.com/v1/traces:
Access-Control-Allow-Credentials: true.
Verify OTLP Protobuf Definitions
Honeycomb supports receiving telemetry data via OpenTelemetry’s native protocol, OTLP, over gRPC, HTTP/protobuf, and HTTP/JSON. The minimum supported versions of OTLP protobuf definitions are 1.0 for traces, metrics, and logs. If the protobuf version in use by the SDK does not match a supported version by Honeycomb, a different version of the SDK may need to be used. If the SDK’s protobuf version is older than the minimum supported version, and telemetry is not appearing as expected in Honeycomb, upgrade the SDK to a version with the supported protobuf definitions. If using an added dependency on a proto library, ensure the version of protobuf definitions matches the supported version of the SDK.OpenTelemetry SDKs and Honeycomb Distributions
Troubleshoot issues related to the OpenTelemetry SDKs and Honeycomb Distributions.Browser JavaScript
CORS Errors
Sometimes a CORS error may occur when setting up browser telemetry. Confirm the receiver’s setup has the correct port defined. The default port forhttp is 4318.
If this port or endpoint is overwritten in the collector configuration file, ensure it matches the endpoint set in the application sending telemetry.
Confirm the allowed_origins list in the receivers matches the origin of the browser telemetry.
If there is a load balancer in front of the Collector, it should also be configured to accept requests from the browser origin.
One way to determine whether the issue is rooted in how the application is exporting as opposed to network connectivity is to issue a curl command to the server from the browser origin.
For example, if the application was running on http://localhost:3000, and the collector was listening on port 4318 at http://otel-collector.com/v1/traces:
Access-Control-Allow-Credentials: true.
FID is Missing
As of v0.18.0, Honeycomb OpenTelemetry Web SDK does not supportfid (First Input Delay) vital.
To continue capturing meaningful responsiveness metrics, we recommend migrating from fid to inp (Interaction to Next Paint) in the Honeycomb Web Instrumentation Package.
JavaScript
My Traces have Duplicate Spans
If aThis trace has multiple spans sharing the same non-null span ID error appears in Honeycomb, it is likely that your application is not instrumented correctly and is sending the same trace to Honeycomb more than once.
One possible misconfiguration is initializing OpenTelemetry more than once.
Make sure to only initialize OpenTelemetry once when the application starts, and then use the Tracing API throughout the application runtime to add manual instrumentation.
Debug Mode
To enable debugging when running the Honeycomb OpenTelemetry Node SDK, set theDEBUG environment variable to true:
debug to the HoneycombSDK:
OTLP Protobuf Definitions
Honeycomb supports receiving telemetry data via OpenTelemetry’s native protocol, OTLP, over gRPC, HTTP/protobuf, and HTTP/JSON. The minimum supported versions of OTLP protobuf definitions are 1.0 for traces, metrics, and logs. If the protobuf version in use by the SDK does not match a supported version by Honeycomb, a different version of the SDK may need to be used. If the SDK’s protobuf version is older than the minimum supported version, and telemetry is not appearing as expected in Honeycomb, upgrade the SDK to a version with the supported protobuf definitions. If using an added dependency on a proto library, ensure the version of protobuf definitions matches the supported version of the SDK.Receiving 464 Errors
You may receive a464 error response from the Honeycomb API when sending telemetry using gRPC and HTTP1.
The gRPC format depends on using HTTP2 and any request over HTTP1 will be rejected by the Honeycomb servers.
Missing .proto Files Error
If your application builds using a bundler, like Webpack or ESBuild, or if your application uses TypeScript, you will see an error that says that a specific .proto file is not found:
.proto files are not imported or required by the library that uses them, so bundlers do not know to include them in the final build.
There are two ways to work around this error:
Copy the /protos Directory to the Correct Location
Modify the bundler configuration to copy the /protos directory from the library to the same level as the build directory:
- Webpack
- Esbuild
- Typescript
Python
My Traces have Duplicate Spans
If aThis trace has multiple spans sharing the same non-null span ID error appears in Honeycomb, it is likely that your application is not instrumented correctly and is sending the same trace to Honeycomb more than once.
One possible misconfiguration is initializing OpenTelemetry more than once.
Make sure to only initialize OpenTelemetry once when the application starts, and then use the Tracing API throughout the application runtime to add manual instrumentation.
Typechecking Errors With MyPy
Using MyPy requires turning on support for namespace packages. To turn on support from the command line, run:Exporting to the Console
The OpenTelemetry Python SDK typically shows errors in the console when applicable. If no errors appear but your data is not in Honeycomb as expected, you can enable debug mode, which prints all spans to the console. This will help confirm whether your app is being instrumented with the data you expect. Set theDEBUG environment variable:
Flask Debugging
If the application uses Flask, instrumentation will not work if Flask debugging is enabled. Unset theFLASK_DEBUG variable or set it to false.
If DEBUG is enabled and FLASK_DEBUG is disabled, the output in the console will show:
Django Instrumentation
If the application uses Django, instrumentation requires theDJANGO_SETTINGS_MODULE and the --noreload flag.
-
Set the environment variable for
DJANGO_SETTINGS_MODULEbased on the name of your settings file. -
Run the application with the
--noreloadflag to avoid Django runningmaintwice. For example, the command to run the application may look like this:
No Traces for a Service
The service name is a required configuration value. If it is unspecified, all trace data will be sent to a default dataset calledunknown_service.
Visualize Traces Locally
Honeycomb’s OpenTelemetry Distribution for Python can create a link to a trace visualization in the Honeycomb UI for local traces. Local visualizations enables a faster feedback cycle when adding, modifying, or verifying instrumentation. To enable local visualizations:-
Set the
HONEYCOMB_ENABLE_LOCAL_VISUALIZATIONSenvironment variable totrue: -
Run your application:
The output displays the name of the root span and a link to Honeycomb that shows its trace. For example:
- Select the link to view the trace in detail within the Honeycomb UI.
In production, disable local visualization as it creates additional overhead to create the link to a trace in Honeycomb and print it to the console.
Bootstrap with Pip
Running theopentelemetry-bootstrap command with --action=install does not add packages to a requirements.txt file, and instead only adds to the current environment.
This can result in inadvertently missing dependencies in checked-in code or container images.
If using pip, our recommendation is as listed in Acquire Dependencies:
- Generate the list of packages with
opentelemetry-bootstrap. - Add the packages to the
requirements.txtfile manually or usingopentelemetry-bootstrap >> requirements.txt. - Install the packages with
pip install -r requirements.txt.
pip freeze and manually add the necessary packages to the requirements.txt file.
Bootstrap with Poetry
Theopentelemetry-bootstrap command does not include the option to install packages when using Poetry.
Refer to the outputted list of packages to manually install each package and add to the pyproject.toml file.
To confirm the installed packages in your poetry environment, run poetry show.
Versions of Core and Contrib
Upgrading OpenTelemetry packages generally work best when they are all upgraded together. The Releases foropentelemetry-python and the Releases for opentelemetry-python-contrib list the compatible versions for each.
For example, Version 1.20.0/0.41b0 means core packages versioned 1.20.0 are compatible with Contrib packages versioned 0.41b0
OTLP Protobuf Definitions
Honeycomb supports receiving telemetry data via OpenTelemetry’s native protocol, OTLP, over gRPC, HTTP/protobuf, and HTTP/JSON. The minimum supported versions of OTLP protobuf definitions are 1.0 for traces, metrics, and logs. If the protobuf version in use by the SDK does not match a supported version by Honeycomb, a different version of the SDK may need to be used. If the SDK’s protobuf version is older than the minimum supported version, and telemetry is not appearing as expected in Honeycomb, upgrade the SDK to a version with the supported protobuf definitions. If using an added dependency on a proto library, ensure the version of protobuf definitions matches the supported version of the SDK.Receiving 464 Errors
You may receive a464 error response from the Honeycomb API when sending telemetry using gRPC and HTTP1.
The gRPC format depends on using HTTP2 and any request over HTTP1 will be rejected by the Honeycomb servers.
Java
No Traces for a Service
The service name is a required configuration value. If it is unspecified, all trace data will be sent to a default dataset calledunknown_service.
My Traces have Duplicate Spans
If aThis trace has multiple spans sharing the same non-null span ID error appears in Honeycomb, it is likely that your application is not instrumented correctly and is sending the same trace to Honeycomb more than once.
One possible misconfiguration is initializing OpenTelemetry more than once.
Make sure to only initialize OpenTelemetry once when the application starts, and then use the Tracing API throughout the application runtime to add manual instrumentation.
Debug Mode
To enable debugging when running with the OpenTelemetry Java Agent, set theotel.javaagent.debug system property or OTEL_JAVAAGENT_DEBUG environment variable to true.
When this setting is provided, the Agent configures a LoggingSpanExporter that logs traces & metrics data.
If you are not using the OpenTelemetry Java Agent, you can add a LoggingSpanExporter to your builder configuration.
This will require adding another dependency on io.opentelemetry:opentelemetry-exporter-logging.
gRPC Transport Customization
A gRPC transport is required to transmit OpenTelemetry data. HoneycombSDK includesgrpc-netty-shaded.
If you are using another gRPC dependency, version conflicts can come up with an error like this:
grpc-netty-shaded transitive dependency:
- Gradle
- Maven
Receiving 464 Errors
You may receive a464 error response from the Honeycomb API when sending telemetry using gRPC and HTTP1.
The gRPC format depends on using HTTP2 and any request over HTTP1 will be rejected by the Honeycomb servers.
Additionally, older JVMs may not have sufficient gRPC support and may attempt to send telemetry using HTTP1.
To resolve this, either update to a newer JVM or use http/protobuf as the transfer protocol.
.NET
No Traces for a Service
The service name is a required configuration value. If it is unspecified, all trace data will be sent to a default dataset calledunknown_service.
My Traces have Duplicate Spans
If aThis trace has multiple spans sharing the same non-null span ID error appears in Honeycomb, it is likely that your application is not instrumented correctly and is sending the same trace to Honeycomb more than once.
One possible misconfiguration is initializing OpenTelemetry more than once.
Make sure to only initialize OpenTelemetry once when the application starts, and then use the Tracing API throughout the application runtime to add manual instrumentation.
Error Log
By default, the .NET SDK does not emit error information to the console. The SDK does include a self-diagnostics feature to help with troubleshooting by writing errors to a log file. Enable self-diagnostics by creating a file in the current working directory calledOTEL_DIAGNOSTICS.json:
OTEL_DIAGNOSTICS.json file will generate a file named for ExecutableName.ProcessId.log, such as console.30763.log.
The newly generated log file will contain any applicable errors for the app.
The LogDirectory represents the directory in which the log file will be stored, and can be changed to output to a different location.
The FileSize is the maximum size the log file can grow in KiB, and can be adjusted if a larger size is needed to prevent overwriting of logging output.
Adjust the log level as needed for more or less verbose logging, using the fields available with System Diagnostics.
To disable this error log, delete the OTEL_DIAGNOSTICS.json file.
Exporting to the Console
If you are using the Honeycomb OpenTelemetry Distribution, warnings will appear in the console if you are missing an API Key or Dataset. If no errors appear but your data is not in Honeycomb as expected, use aConsoleExporter to print your spans to the console.
This will help confirm whether your app is being instrumented with the data you expect.
-
Import the
ConsoleExporter:dotnet add package OpenTelemetry.Exporter.Console --prerelease -
Add the
ConsoleExporterto your configuration:
Receiving 464 Errors
You may receive a464 error response from the Honeycomb API when sending telemetry using gRPC and HTTP1.
The gRPC format depends on using HTTP2 and any request over HTTP1 will be rejected by the Honeycomb servers.
Instrumentation Package Rename
Previous versions of the Honeycomb OpenTelemetry Distribution had a package calledHoneycomb.OpenTelemetry.AutoInstrumentations, which was renamed to Honeycomb.OpenTelemetry.CommonInstrumentations.
The name change of the instrumentation package is intended to better reflect the purpose of the package, but is a potential upgrade step to ensure the appropriate package is being used.
Refer to our Releases page on GitHub as needed.
OpenTelemetry Tracing and Metrics Rename
Previous versions of OpenTelemetry usedAddOpenTelemetryTracing and AddOpenTelemetryMetrics to add tracing and metrics.
AddOpenTelemetryTracing has been replaced with AddOpenTelemetry().WithTracing.
AddOpenTelemetryMetrics has been replaced with AddOpenTelemetry().WithMetrics.
Go
No Traces for a Service
The service name is a required configuration value. If it is unspecified, all trace data will be sent to a default dataset calledunknown_service.
My Traces have Duplicate Spans
If aThis trace has multiple spans sharing the same non-null span ID error appears in Honeycomb, it is likely that your application is not instrumented correctly and is sending the same trace to Honeycomb more than once.
One possible misconfiguration is initializing OpenTelemetry more than once.
Make sure to only initialize OpenTelemetry once when the application starts, and then use the Tracing API throughout the application runtime to add manual instrumentation.
Printing to the Console
If no errors appear but your data is not in Honeycomb as expected, you can set theDEBUG environment variable, which will both log the distribution configuration to stdout and configure spans to be output to stdout.
This will help confirm whether your app is being instrumented with the data you expect.
Exporting to an Insecure Endpoint
By default, the Honeycomb Distribution uses a secure exporter. To export to an insecure endpoint, such as a local collector on the same network, set the Insecure option for the exporter with an environment variable:OTLP Protobuf Definitions
Honeycomb supports receiving telemetry data via OpenTelemetry’s native protocol, OTLP, over gRPC, HTTP/protobuf, and HTTP/JSON. The minimum supported versions of OTLP protobuf definitions are 1.0 for traces, metrics, and logs. If the protobuf version in use by the SDK does not match a supported version by Honeycomb, a different version of the SDK may need to be used. If the SDK’s protobuf version is older than the minimum supported version, and telemetry is not appearing as expected in Honeycomb, upgrade the SDK to a version with the supported protobuf definitions. If using an added dependency on a proto library, ensure the version of protobuf definitions matches the supported version of the SDK.Receiving 464 Errors
You may receive a464 error response from the Honeycomb API when sending telemetry using gRPC and HTTP1.
The gRPC format depends on using HTTP2 and any request over HTTP1 will be rejected by the Honeycomb servers.
Ruby
If no errors appear in the console but your data is not in Honeycomb as expected, use aConsoleSpanExporter to print your spans to the console.
This will help confirm whether your app is being instrumented with the data you expect.
As shown in the OpenTelemetry SDK for Ruby, configuration options can be set via environment variables or programmatically.
To use an environment variable to print to the console, set the variable before calling configure:
ConsoleSpanExporter to your configuration:
No Traces for a Service
The service name is a required configuration value. If it is unspecified, all trace data will be sent to a default dataset calledunknown_service.
My Traces have Duplicate Spans
If aThis trace has multiple spans sharing the same non-null span ID error appears in Honeycomb, it is likely that your application is not instrumented correctly and is sending the same trace to Honeycomb more than once.
One possible misconfiguration is initializing OpenTelemetry more than once.
Make sure to only initialize OpenTelemetry once when the application starts, and then use the Tracing API throughout the application runtime to add manual instrumentation.
Apple Mac M1 Protobuf Library Errors
The OpenTelemetry libraries may produce an error on Apple Mac M1 computers.google-protobuf library.
google-protobuf library for the ruby platform.
OTLP Protobuf Definitions
Honeycomb supports receiving telemetry data via OpenTelemetry’s native protocol, OTLP, over gRPC, HTTP/protobuf, and HTTP/JSON. The minimum supported versions of OTLP protobuf definitions are 1.0 for traces, metrics, and logs. If the protobuf version in use by the SDK does not match a supported version by Honeycomb, a different version of the SDK may need to be used. If the SDK’s protobuf version is older than the minimum supported version, and telemetry is not appearing as expected in Honeycomb, upgrade the SDK to a version with the supported protobuf definitions. If using an added dependency on a proto library, ensure the version of protobuf definitions matches the supported version of the SDK.Receiving 464 Errors
You may receive a464 error response from the Honeycomb API when sending telemetry using gRPC and HTTP1.
The gRPC format depends on using HTTP2 and any request over HTTP1 will be rejected by the Honeycomb servers.
Libhoney
Troubleshoot issues related to LibHoney.JavaScript
If you do not specify a dataset, event data will be sent to a dataset calledunknown_dataset.
If using Honeycomb Classic without specifying a dataset, you will get an error at runtime and no data will be sent.
Python
Debug Mode
Our Python SDK supports an optional debug mode. Simply passdebug=True to the init function at startup to get verbose logging of events sent to and responses from the Honeycomb API.
Using the Python SDK with Python Pre-Fork Models
Popular servers like uWSGI and Gunicorn utilize a pre-fork model where requests are delegated to separate Python processes. Initializing the SDK before the fork happens can lead to a state where events cannot be sent. To initialize the SDK correctly, you will need to run your init code inside a post-fork hook.uWSGI
Users of uWSGI can use a postfork decorator. Simply add the@postfork decorator to the function that initializes the Python Beeline, and it will be executed post-fork.
Gunicorn
Gunicorn users can define apost_worker_init function in the Gunicorn configuration, and initialize the SDK there.
-c option:
Celery
Celery uses a pre-fork approach to create worker processes. You can specify aworker_process_init decorated function to initialize the Python SDK after each worker has started.
Java
If you do not specify a dataset, event data will be sent to a dataset calledunknown_dataset.
If using Honeycomb Classic without specifying a dataset, you will get an error at runtime and no data will be sent.
Go
If you do not specify a dataset, event data will be sent to a dataset calledunknown_dataset.
If using Honeycomb Classic without specifying a dataset, you will get an error at runtime and no data will be sent.
Ruby
If you do not specify a dataset, event data will be sent to a dataset calledunknown_dataset.
If using Honeycomb Classic without specifying a dataset, you will get an error at runtime and no data will be sent.
Honeytail
Troubleshoot issues related to Honeytail.General Troubleshooting
Below, find some general debugging tips when trying to send data to Honeycomb.New Data Does Not Show Up in Honeycomb, and New Dataset Does not Appear on Dashboard
“Datasets” are created when we first begin receiving data under a new “Dataset Name” (used/specified by all of our SDKs and agents). If you do not see an expected dataset yet, our servers mostly likely have not yet received anything from you. To figure out why, the simplest step is to add a--debug flag to your honeytail call.
This should output information about whether lines are being parsed, failing to send to our servers, or whether honeytail is receiving any input at all.
Another useful thing to try may be to add --status_interval=1 to your flags, which will output a line like the below, each second (newlines added for legibility):
total here is the number of events sent to Honeycomb; the rest are stats characterizing how those events were sent and received.
(A total=0 value would clue us into the fact that honeytail is not sending any events at all.)
In the line above, we see that events were, in fact, invalid and being rejected by the server.
New Events do not Appear in an Existing Dataset
When usinghoneytail, the --dataset (-d for short) argument will determine the name of the dataset created on Honeycomb’s servers.
If you are writing into an existing dataset, the quickest way to check for new data is to run a COUNT query over the last 30 minutes:
If your new events do not appear, try the --debug or --status_interval=1.
(Change the status interval from 1 to 5 to see the summary every 5 seconds).
honeytail does not seem to be progressing on my log file
Are you trying to send data from an existing file?
honeytail’s default behavior is to watch files and process newly-appended data.
If you are attempting to send data from an existing file, make sure to use the --backfill flag.
This flag will make sure honeytail begins reading the file from the beginning and exits when finished.
Existing Timestamps Values are not Respected
Our JSON parser makes a best-effort attempt to parse and understand timestamps in your JSON logs. Take a look at the Timestamp parsing section of the JSON docs to see timestamp formats understood by default. If you suspect your timestamp format is unconventional, or the time field is keyed by an unconventional field name, providing--json.timefield and --json.format arguments will nudge honeytail in the right direction.
NGINX
First, check outhoneytail General Troubleshooting section for general debugging tips.
Exiting with error message like log_format <format> not found in given config
Make sure the file referenced by --nginx.conf contains your log format definitions.
The log format definition should look something like the example below, and should contain whatever format name you are passing to --nginx.format:
nginx.conf file, while a different config file (maybe under, say, /etc/nginx/sites-enabled/api.conf) tells nginx how to output the access_log and which format to use.
In this case, you will want to make sure and use the config file containing the log_format line for the --nginx.conf argument.
No data is being sent, and --debug reveals failed to parse nginx log line messages
If your log format has fields that are likely to have spaces in them, make sure to surround that field with single quotes.
For example, if $my_upstream_var is likely to contain spaces, you will want to change this:
log_format with quotes:
$my_upstream_var value is correctly surrounded by quotes.
It is good practice to put any variable that comes from an HTTP header in double quotes, because you are depending on whomever is sending you traffic to put only one string in the header.
Some headers also default to multiple words.
For example, the $http_authorization header is represented by a - if it is absent and is two words (Basic abcdef123456) when present.
MySQL
First, check outhoneytail General Troubleshooting section for general debugging tips.
No data is being sent, and --debug does not seem to show anything useful
Take a look at the --file being handed to honeytail and make sure they look like MySQL slow query logs, with blocks of comments containing metadata alternating with the MySQL commands issued.
An example excerpt from a MySQL slow query log might look like:
Only Some Queries Seem to Appear in Honeycomb
Did you remember toSET the GLOBAL long_query_time?
Our parser relies on reading your server’s slow query logs, which contain much more valuable metadata than the general log—and the default slow query threshold is 10 seconds.
Try checking the output of:
0, take another look at the steps to Configure MySQL Query Logging.
PostgreSQL
First, check outhoneytail General Troubleshooting section for general debugging tips.
No data is being sent, and --debug does not seem to show anything useful
Take a look at the --file being handed to honeytail and make sure it contains PostgreSQL query statements.
An example excerpt from a PostgreSQL log file might look like:
--postgresql.log_line_prefix flag matches PostgreSQL’s configured value, which you can find using SHOW log_line_prefix at a psql prompt: