Developer Q&A Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Parameter store for Dynatrace app

TerryL
Visitor

Hi guys,

I am trying to store some static value in Dynatrace environment instead of hardcode it in to the App repo.

I tried using credential vault as a storage but App Engine cannot provide app context, and share to all is banned when no app context is enabled.

Can you guys recommended some solutions?

Many thanks!

Terry

2 REPLIES 2

imsingh
Dynatrace Mentor
Dynatrace Mentor

Hi Terry

If the idea is that user should be able to provide value via Dynatrace and your app should be able to use that value. I'd suggest to use the settings for that.

The App Settings API  is purpose-built for this use case. It lets you define a schema and store key-value config (including secrets) scoped to the app itself.

How it works:
1. Define a schema in /settings/schemas/ in your app project:

{
  "schemaId": "app:my-app:config",
  "version": "1.0.0",
  "properties": {
    "apiEndpoint": { "type": "text", "nullable": false },
    "apiKey": { "type": "secret", "nullable": false }
  }
}
2. Read values at runtime using the react hooks:
const { data } = useSettingsV2({ schemaId: 'app:my-app:config' });
 

Why it's ideal: Values live in Dynatrace (not the repo), are editable via the Settings UI, support secrets with masking, and work natively within App Engine without needing app context for credential vault.

Does that help somehow?

Indermohan Singh




Hi Indermohan,

I am looking into `/settings/schemas/`, but only found List/Get Schema API, should I try POST Object API, then what should I set the scope?

Many Thanks!

Featured Posts