digma-ai / digma-intellij-plugin

Digma JetBrains plugin
MIT License
32 stars 7 forks source link

digma plugin - api to support idea launcher webpage #2587

Closed shaykeren closed 1 week ago

shaykeren commented 1 week ago

related to ui issue #https://github.com/digma-ai/digma-ui/issues/1154

Api routes describe in the following UI issue ##https://github.com/digma-ai/digma-ui/issues/1154

scanning API - digma/about API http://localhost:63344/api/digma/about Response:

{
  "source" : "Digma Plugin",
  "name" : "IntelliJ IDEA 2024.3 RC",
  "productName" : "IDEA",
  "edition" : "Community Edition",
  "baselineVersion" : 243,
  "buildNumber" : "243.21565.101",
  "pluginVersion" : "2.0.396",
  "backendVersion" : "0.3.155-alpha.2",
  "backendDeploymentType" : "Helm",
  "isCentralized" : true,
  "openProjects" : [ "spring-petclinic" ]
}

{
  "source" : "Digma Plugin",
  "name" : "IntelliJ IDEA 2024.3 RC",
  "productName" : "IDEA",
  "edition" : "Community Edition",
  "baselineVersion" : 243,
  "buildNumber" : "243.21565.101",
  "pluginVersion" : "2.0.396",
  "backendVersion" : "0.3.153",
  "backendDeploymentType" : "DockerCompose",
  "isCentralized" : false,
  "openProjects" : [ "spring-petclinic" ]
}

if there is no project open or user is not connected to backend, backendVersion and backendDeploymentType will be unknown and isCentralized will be false

{
  "source" : "Digma Plugin",
  "name" : "IntelliJ IDEA 2024.3 RC",
  "productName" : "IDEA",
  "edition" : "Community Edition",
  "baselineVersion" : 243,
  "buildNumber" : "243.21565.101",
  "pluginVersion" : "2.0.396",
  "backendVersion" : "unknown",
  "backendDeploymentType" : "unknown",
  "isCentralized" : false,
  "openProjects" : [ ]
}

use the following URL to resolve spanUid to spancodeobjectid + environment spans/spanCodeObjectId/{uid} response

{
    "environmentId": "",
    "spanCodeObjectId": ""
}

** response can be null if uid not exists

will be available in backend version >=0.3.155

kshmidt-digma commented 1 week ago

The "See issues" button in the email should open the Digma Metrics report