grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
9.98k stars 598 forks source link

Upgrading from 1.0.0 to 1.1.5 changes profiling type with Python SDK #2687

Open aurbina83 opened 10 months ago

aurbina83 commented 10 months ago

I'm currently using the Python SDK - version 0.8.5

Without any changes in my implementation on my service, after upgrading to Pyroscope 1.1.5, suddenly my profile_type is only process_cpu:samples where before it was process_cpu.cpu.

This is without changing any configs at all. Simply updating the docker image tag.

For brevity, I'll share my configs.

It's pretty bare because it's something we use locally to help debug some bottlenecks.

# Pyroscope config
server:
  http_listen_port: 4040

limits:
  max_query_length: 5d
  max_query_lookback: 10d

self_profiling:
  disable_push: true
# grafana data sources
apiVersion: 1

datasources:
- name: Loki
  type: loki
  url: http://loki:3100
  isDefault: true
  editable: true
  jsonData:
    derivedFields:
      - name: "request_tag"
        matcherRegex: '"request_id"\s*:\s*"(\w+)"'
        url: 'process_cpu:cpu:nanoseconds:cpu:nanoseconds{request_tag="$${__value.raw}"}'
        datasourceUid: pyroscope
      - name: "dd_tag"
        matcherRegex: '"dd\.trace_id"\s*:\s*"(\w+)"'
        url: 'process_cpu:cpu:nanoseconds:cpu:nanoseconds{dd_tag="$${__value.raw}"}'
        datasourceUid: pyroscope
- name: Pyroscope
  type: grafana-pyroscope-datasource
  uid: pyroscope
  url: http://pyroscope:4040

Not sure what changed or if there's some config changes I need to make to get the cpu profile types back.

cyriltovena commented 10 months ago

interesting @korniltsev do you remember anything we did for the profile type in 1.1.5 ?

korniltsev commented 10 months ago

I only remember this https://github.com/grafana/pyroscope/commit/5f8be6f65806e8dd3790492ae09a99b2fb57de15 but it was merged in 1.0.2

korniltsev commented 10 months ago

I also dont understand the issue

lzyli commented 10 months ago

I got the same issue with Pyroscope 1.2 and SDK 0.8.5, changed SDK to 0.8.4 and It worked properly.

swbliss commented 5 months ago

@lzyli Thank you for your tip! I've suffered from the same issue. pyroscopeio==0.8.4 works for me too :)