Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 04:53
    gaurang-makwana commented #1173
  • Nov 30 20:35
    brandur commented #1191
  • Nov 30 18:41
    lzchen commented #1173
  • Nov 30 14:47
    gaurang-makwana opened #1173
  • Nov 30 14:47
    gaurang-makwana labeled #1173
  • Nov 17 02:42
    edwardshao closed #1172
  • Nov 17 02:42
    edwardshao commented #1172
  • Nov 17 01:58

    lzchen on master

    remove sqlalchemy upper limit v… (compare)

  • Nov 17 01:58
    lzchen closed #1142
  • Nov 16 18:20
    lzchen commented #1172
  • Nov 16 18:18
    lzchen labeled #1172
  • Nov 16 11:53
    edwardshao edited #1172
  • Nov 16 11:51
    edwardshao opened #1172
  • Nov 11 15:40
    Willem-J-an commented #1085
  • Nov 11 04:56
    Willem-J-an commented #1085
  • Nov 10 16:00
    farexw commented #1286
  • Nov 10 15:22
    dashpole closed #1286
  • Nov 10 15:22
    dashpole commented #1286
  • Nov 10 13:01
    farexw synchronize #1286
  • Nov 10 12:19
    google-cla[bot] commented #1286
Yaroslav Skopets
If it was possible to have multiple OpenCensus configurations in parallel, it would enable a use case where a user can set up different exporters for different subsets of traffic passing through Envoy
Hi Experts, anyone has encountered this issue when using oc-agent? census-instrumentation/opencensus-service#640 Thanks!
Vinh Vu
hey all, im having trouble running the example found here: https://pypi.org/project/opencensus-ext-requests/ (but exporting to stackdriver). ive installed requests and the extension, but i’m not getting any requests info (http method, status code, etc.) in Google's Cloud Trace. the span does appear though. has anyone else run into this issue? any extra configuration needed to be added?
im running on these versions
code in question:
def initialize_tracer():
    exporter = StackdriverExporter(project_id=‘<PROJECT_ID>’, transport=AsyncTransport)
    return Tracer(exporter=exporter, sampler=AlwaysOnSampler())

tracer = initialize_tracer()
config_integration.trace_integrations(['requests'], tracer=tracer)
with tracer.span(name=’span_name'):
    response = requests.get(url='https://www.wikipedia.org/wiki/Rabbit’)

# Span appears but without any requests information
Vinh Vu
looks like with older versions it works:
Vinh Vu
this is the highest version numbers i can go with it working:
Paul Selden
are there any examples of using stackdriver trace with the python logging module? ideally i just want it so my logs show up with my traces
RNDr. Simon Toth

I'm trying to setup OpenCensus for our project, but I'm running into issues with Bazel. external/io_opencensus_cpp/opencensus/exporters/trace/stackdriver/BUILD:24:1: error loading package '@com_google_googleapis//google/devtools/cloudtrace/v2': Unable to find package for @com_google_googleapis_imports//:imports.bzl: The repository '@com_google_googleapis_imports' could not be resolved. and referenced by '@io_opencensus_cpp//opencensus/exporters/trace/stackdriver:stackdriver_exporter'

Can anyone help?

@HappyCerberus it looks like the WORKSPACE in your project isn't defining the @com_google_googleapis_imports repository. You may be missing this: https://github.com/census-instrumentation/opencensus-cpp/blob/04ed0211931f12b03c1a76b3907248ca4db7bc90/WORKSPACE#L76
RNDr. Simon Toth
@g-easy Yes, thanks, I managed to figure this out. It needed the following snippet, before the OpenCensus import: https://gist.github.com/HappyCerberus/cd9a730e40d0c8380692e832f3b900ce
Matt Welke

Can anyone help me with a use case with multiple exporters?

I want to have two exporters in my app. They would both export to Stackdriver Monitoring, but each would have a different reporting interval. This is because I'd use one set of metrics for alerting, with a frequent reporting interval, and another set of metrics for information only, with a very infrequent reporting interval, to save money. Stackdriver Monitoring custom metrics are very expensive.

I looked at the documentation for Go and Java metrics, and both of them make it seem like the only way to set up the views and exporters is to register them all globally. It seems like it's all global state, that if you set up a view, you have to have it send metrics to all registered exporters, and vice versa. This would make it seem like I can't do my use case with OpenCensus. Is this true? Or if it's not, does anyone know, how I'd do it?

Shubham Gupta
Screenshot 2020-04-23 at 03.33.12.png
Hi guys, the website https://opencensus.io/ is down
RNDr. Simon Toth
I'm using the standard gRPC / StackDriver integrations (C++). It does export some metrics, but one very basic thing that I seem to be missing is the number of RPCs. Is there a way to get at that from the existing exported metrics, or do I need to export a custom one?
Priyanka Uppalwar

Hey people, I have a question with integrating application logs with ocagent exporter.
I am trying to integrate ocagent with my Go application.
I already have added logs with logrus library in my app, the issue is now export to Jaeger.
I am not able to view the logs with the spans.

Can these logs not be configured in the exporter? Or is the Annotate api provided only way to add the logs.

Hi folks,
I'm trying to export stats using OC Python to Stackdriver. My python app is running in a GKE container.
The stats are appearing in Stackdriver (after adding the env variables CONTAINER_NAME and NAMESPACE), however:
  • the stats are not reported against any particular Resource type in Stackdriver. I'd expected that it would be reported against k8s_pod>
    Do I have to explicitly set that up in code when I create the Stackdriver Exporter?
    Isn't GcpMetadataConfig supposed to kick in and detect that it is running in GCP, k8s environment on the basis of the following environment variables being present:
7 replies
Veera Pirla

Hey people, I have a question with integrating application logs with ocagent exporter.
I am trying to integrate ocagent with my Go application.
I already have added logs with logrus library in my app, the issue is now export to Jaeger.
I am not able to view the logs with the spans.

Can these logs not be configured in the exporter? Or is the Annotate api provided only way to add the logs.

Any suggestions on this?

I see lot of clock skew adjustments in my spans, any pointers to debug?
Hi there, we are using oc-agent as side car to collect metrics and metrics, then prometheus is configured to scrapped from oc-agent, and I have observed that oc-agent keeps staled metrics, does anyone have this issue? version used 0.1.11
Pirogov Alexey

Hi folks. We use open-census java lib and need to integrate with upstream systems that don't use tracing. But these systems send us messages with info about when they started/finished processing (in the past).

Is it possible to create "backdated spans" and manually set StartTime and EndTime in the past? I noticed that Span uses Clock object, but it seems that it isn't exposed.

Eric Maland
Hi folks. I'm sending traces from an opencensus exporter to an opencensus agent and aggregating that to jaeger. The exporter has a Service Name configured but the ocagent wants to stomp that (with "OpenCensus" by default), anyone know how I prevent it from rewriting that?
Yonghao Yu
Hi folks, we use opencensus java for metric and tracing. How can I write unit test to verify StatsRecorder record correct metrics? In my code, StatsRecorder is static variable, and I use statsRecorder.newMeasureMap().put().record(tctx); to record metrics. In my test, is there anyway I can get all metrics being recorded and verify those metrics? Thanks!
1 reply
Jonas Jing
Hi there, I'm new to OpenCensus, and I meet a problem. I use metric.getTimeSeriesList() to get a timeseries, and use timeseries.getPoints(), there is always one Point, not a list of Point. Should there be a list of Point?
Hi folks, I'm new to OpenCensus, and I meet a problem. I'm using kubernetes to deploy Jaeger components and the UI is currently not hosted on localhost but on another url provided by ingress. I was using the same piece of code but now traces are not showing on UI, should I make any editions to the code where I create and register JaegerTraceExporter?
Veera Pirla
OCAgent exporter doesn't allow more than 32 annotations for span, Any specific reason?
Bas van Beek
because if you overload your spans with data you're setting yourself up for failure or at least high cost low value.
if you really need to record that much metadata about a particular operation it is better to do so in a log and have correlation between your logs and traces set up.
Veera Pirla
But jaeger exporter sends more than 32 and also opencensus/trace does lets you configure that annotations,why to hardcode?
Bas van Beek
If you feel you should have more available I suggest filing an issue report on the repo. If possible provide a rationale why you would need a higher number.
Chris Dietsch

I've got some major confusions about how to use opencensus in typescript. Almost every example I follow doesn't seem to work for me. I'm using Yarn and electron in the browser context. For example, I want to just confirm this is working with opencensus/nodejs-base so ive done:

yarn add @opencensus/nodejs-base

and following from the docs:

It says to use

(assuming the implication is to do: import * as tracing from '@opencensus/nodejs-base'; like for regular @opencensus/nodejs)

and that tracing type comes back and does not have a tracer, tracing in this context is a TraceBase. What am I doing wrong?

Hello community,
I have a really basic question: why to use openCensus and not azure insights, for app created in azure? Any main reason?
39 replies
Reuben Anderson
Hello, i'm using the python sdk to record stats to azure monitor. I'm seeing that custom metrics just carry on getting logged in the background when my client app is doing nothing. Am I supposed to destroy the measurement map, or something? Or do I quiesce the exporter somehow? confused. Thanks.
13 replies
hey everyone, I've instrumented my php app with opencensus-php + opencensus Jaeger exporter. I see a clear spike in peak memory usage compared to without tracing on every endpoint which produces considerable number of spans(~100). Any clue on what's happening and where?
2 replies
Bas van Beek
Tracing is not free. Are you using the pecl plugin or userland php? If userland i’d suggest switching as in prod i would always advice pecl version
Also nullexporter does not mean you’re not acquiring data... you’re just flushing it after span reporting time
Raj Nishtala

Hello, I want to be able to write custom exporters for OpenCensus in Python because I want to send metrics from Python 2.x services to a backend that's not currently listed here:

I see that there's documentation available to write custom exporters in other languages (Go, Java etc...). Looking for some suggestions/examples of how to write one in Python.

5 replies
RNDr. Simon Toth
Does anyone have a workaround for C++ not exporting number of RPCs and their status for gRPC?
Shivaprasad Bhat
Hello everyone! What is the recommended practice when setting span names for external HTTP calls (i.e., GET /v1/users/:userid vs GetUser vs GET /v1/users/123 -- would there be cardinality issues when using the third option)? Also, is there any good documentation on OpenCensus best practices ?
3 replies
Heya folks! Any advice on reporting stats/metrics in a Functions-as-a-service context? Stackdriver has a max reporting cadence of 1/minute and the functions "go to sleep" and may be killed between invocations. I'd like to make sure we don't drop any of the census data for functions that aren't called often enough to be kept alive.
Hi~ We are using Envoy + Open Census tracer for our application. It works well in producing traces, but it's not able to figure out parent/child relationship between egress and ingress spans of the same service. We've configured incoming_trace_context and outgoing_trace_context documented here: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/opencensus.proto. Do we also need to configure client code to propagate those headers?
1 reply
Howdy I'm trying to use OpenCensus for metrics and I'm wondering what the Label family of types is about? I can't find documentation on it, but it seems to work a lot like the Tag family (but newer).
1 reply
Eric Shen
Hi, I am using the the Prometheus(Java) exporter. I noticed that counters are cumulative. Our backend only supports delta metrics. I also came across the 2 yr old thread https://groups.google.com/g/census-developers/c/3o71hhq2D-c/m/hgq_1QmmEwAJ. It seems that the detla metrics were not supported then. I am wondering if it's supported now or any other ways to create delta metrics. thx!
Matt Welke
Was wondering if anyone had experience with the Stackdriver exporter in Go. I had a question on how it's meant to be used. I don't understand why you aren't required to call view.RegisterExporter anymore: census-ecosystem/opencensus-go-exporter-stackdriver#293
Saad Bajwa
Hi Everyone,
I am using opencensus and writing a custom metric exporter in Python. Can anyone help me with how can I get the tags key and value from metric in Custom Exporter?
Micky Kurniawan
Hi all, I'm having an issue with MeasureDouble and View with Aggregation.Sum. There is no metric value shown in GCP. When I change the measure to MeasureLong I can see the metric value though. census-instrumentation/opencensus-java#2092
Micky Kurniawan
Nevermind it solved, turns out I need to recreate new View as I used existing View with MeasureLong
Hi everyone, does anyone can tell ne how to integrate Azure application insights the right way with opencensus. I did an implementation but it is unable to identify nodes in applications map properly, really struggling with this. Any help will be really appreciated
David Gang
hi, I am using the opencensus prometheus exporter and want to send exemplars through promhttp. the problem is that there is no way to configure promhttp to enable the open metrics format, which is the only supported way to send exemplars: https://github.com/census-ecosystem/opencensus-go-exporter-prometheus/blob/master/prometheus.go#L70
i could fork the exporter and add this option in my forked code but wanted to ask if there is a better solution
Himangi Saraogi
hi, I was using the opencensus zpages for my application, we already have prometheus metrics (not implemented using a prom client) and opencensus tracing, I know zpages provide views based on in-memory stats but these html pages seem to have limited functionality compared to grafana (visualize metrics) or jaeger (compare traces), what scenarios have people found zpages to be especially useful and is it a value add if we already have grafana and jaeger?