Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Memory usage grows when using StackdriverExporter for Flask app #334

@Amey-D

Description

@Amey-D

I am using opencensus-python library to trace requests to my Python Flask application.

I have noticed that when using a StackdriverExporter instance, the memory usage of my app grows steadily for each traced request. When observed using memory_profiler, the memory usage grows roughly 700KB to 1MB per request. I have also noticed similar usage growth on GKE metrics dashboard when running the app on GKE.

All other factors being the same, if I use a LoggingExporter instance (instead of StackdriverExporter), the memory usage stays constant (as expected).

I have put together a sample app along with commands to repro this issue: https://gist.github.com/Amey-D/ebbf7acb77446e81998cf325c7737e73

Any ideas?

Metadata

Metadata

Assignees

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