Giter Club home page Giter Club logo

Comments (4)

dcramer avatar dcramer commented on May 23, 2024 1

Another option here would be to overload the 'platform' payload, as I believe that gets indexed as well. Right now it shows Go, which is true, but we dont really care about the Go runtime in this case, we care about it being kubernetes.

from k8s-sentry.

wichert avatar wichert commented on May 23, 2024

Can the platform payload be set? From what I remember from either the JavaScript or Python libraries the library always forces it to the implementation language.

One thing that might be interesting is to use annotations to configure the DSN. For example:

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: myservice
  labels:
    app.kubernetes.io/name: myservice
  annotations:
    sentry/dsn: "https://[email protected]/1927471"

from k8s-sentry.

wichert avatar wichert commented on May 23, 2024

For reference, this is an existing event:

{
  "event_id": "762dabcc8d4947bbbd360cac2aa5bce5",
  "project": 1474763,
  "release": null,
  "dist": null,
  "platform": "go",
  "message": "Pod/twisted-0: Liveness probe failed: Get http://192.168.61.67:8000/_status/liveness: net/http: request canceled (Client.Timeout exceeded while awaiting headers)",
  "datetime": "2020-03-19T07:36:14.000000Z",
  "tags": [
    [
      "component",
      "kubelet"
    ],
    [
      "controller-revision-hash",
      "twisted-68995598f9"
    ],
    [
      "environment",
      "production"
    ],
    [
      "kind",
      "Pod"
    ],
    [
      "level",
      "warning"
    ],
    [
      "namespace",
      "production"
    ],
    [
      "os.name",
      "linux"
    ],
    [
      "reason",
      "Unhealthy"
    ],
    [
      "runtime",
      "go go1.13.3"
    ],
    [
      "runtime.name",
      "go"
    ],
    [
      "server_name",
      "sentry-66cbcd766d-jr48x"
    ],
    [
      "type",
      "Warning"
    ]
  ],
  "_metrics": {
    "bytes.ingested.event": 1186,
    "bytes.stored.event": 1857
  },
  "contexts": {
    "device": {
      "num_cpu": 24,
      "arch": "amd64",
      "type": "device"
    },
    "runtime": {
      "version": "go1.13.3",
      "type": "runtime",
      "name": "go"
    },
    "os": {
      "type": "os",
      "name": "linux"
    }
  },
  "culprit": "",
  "environment": "production",
  "extra": {
    "count": 1
  },
  "fingerprint": [
    "kubelet",
    "Warning",
    "Unhealthy",
    "Liveness probe failed: Get http://192.168.61.67:8000/_status/liveness: net/http: request canceled (Client.Timeout exceeded while awaiting headers)",
    "apps/v1",
    "StatefulSet",
    "twisted"
  ],
  "grouping_config": {
    "enhancements": "eJybzDhxY05qemJypZWRgaGlroGxrqHRBABbEwcC",
    "id": "legacy:2019-03-12"
  },
  "hashes": [
    "756acf8b71705a8dc005ce7e113d3053"
  ],
  "key_id": "853044",
  "level": "warning",
  "logentry": {
    "formatted": "Pod/twisted-0: Liveness probe failed: Get http://192.168.61.67:8000/_status/liveness: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
  },
  "logger": "",
  "metadata": {
    "title": "Pod/twisted-0: Liveness probe failed: Get http://192.168.61.67:8000/_status/liveness: net/http: r..."
  },
  "received": 1584603375.63081,
  "sdk": {
    "version": "0.3.0",
    "name": "sentry.go",
    "packages": [
      {
        "version": "0.3.0",
        "name": "sentry-go"
      }
    ],
    "integrations": [
      "ContextifyFrames",
      "Environment",
      "IgnoreErrors",
      "Modules"
    ]
  },
  "timestamp": 1584603374,
  "title": "Pod/twisted-0: Liveness probe failed: Get http://192.168.61.67:8000/_status/liveness: net/http: r...",
  "type": "default",
  "version": "7",
  "location": null
}

from k8s-sentry.

wichert avatar wichert commented on May 23, 2024

@dcramer I was correct: you can not set the platform payload, since prepareEvent will always force it:

https://github.com/getsentry/sentry-go/blob/ed4cddea04a210c978e126c534ed5b990e6da9eb/client.go#L431

from k8s-sentry.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.