Grafana would forward the X-Grafana-User header to backend plugin request when
dataproxy.send_user_header is enabled. In addition, X-Grafana-User will be automatically
forwarded in outgoing HTTP requests for core/builtin HTTP datasources.
Use grafana-plugin-sdk-go v0.147.0.
Fixes#47734
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Lattice: Point to private prerelease of aws-sdk-go (#515)
* point to private prerelease of aws-sdk-go
* fix build issue
* Lattice: Adding a feature toggle (#549)
* Adding a feature toggle for lattice
* Change name of feature toggle
* Lattice: List accounts (#543)
* Separate layers
* Introduce testify/mock library
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
* point to version that includes metric api changes (#574)
* add accounts component (#575)
* Test refactor: remove unneeded clientFactoryMock (#581)
* Lattice: Add monitoring badge (#576)
* add monitoring badge
* fix tests
* solve conflict
* Lattice: Add dynamic label for account display name (#579)
* Build: Automatically sync lattice-main with OSS
* Lattice: Point to private prerelease of aws-sdk-go (#515)
* point to private prerelease of aws-sdk-go
* fix build issue
* Lattice: Adding a feature toggle (#549)
* Adding a feature toggle for lattice
* Change name of feature toggle
* Lattice: List accounts (#543)
* Separate layers
* Introduce testify/mock library
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
* point to version that includes metric api changes (#574)
* add accounts component (#575)
* Test refactor: remove unneeded clientFactoryMock (#581)
* Lattice: Add monitoring badge (#576)
* add monitoring badge
* fix tests
* solve conflict
* add account label
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* fix import
* solve merge related problem
* add account info (#608)
* add back namespaces handler
* Lattice: Parse account id and return it to frontend (#609)
* parse account id and return to frontend
* fix route test
* only show badge when feature toggle is enabled (#615)
* Lattice: Refactor resource response type and return account (#613)
* refactor resource response type
* remove not used file.
* go lint
* fix tests
* remove commented code
* Lattice: Use account as input when listing metric names and dimensions (#611)
* use account in resource requests
* add account to response
* revert accountInfo to accountId
* PR feedback
* unit test account in list metrics response
* remove not used asserts
* don't assert on response that is not relevant to the test
* removed dupe test
* pr feedback
* rename request package (#626)
* Lattice: Move account component and add tooltip (#630)
* move accounts component to the top of metric stat editor
* add tooltip
* CloudWatch: add account to GetMetricData queries (#627)
* Add AccountId to metric stat query
* Lattice: Account variable support (#625)
* add variable support in accounts component
* add account variable query type
* update variables
* interpolate variable before its sent to backend
* handle variable change in hooks
* remove not used import
* Update public/app/plugins/datasource/cloudwatch/components/Account.tsx
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Update public/app/plugins/datasource/cloudwatch/hooks.ts
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* add one more unit test
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* cleanup (#629)
* Set account Id according to crossAccountQuerying feature flag in backend (#632)
* CloudWatch: Change spelling of feature-toggle (#634)
* Lattice Logs (#631)
* Lattice Logs
* Fixes after CR
* Lattice: Bug: fix dimension keys request (#644)
* fix dimension keys
* fix lint
* more lint
* CloudWatch: Add tests for QueryData with AccountId (#637)
* Update from breaking change (#645)
* Update from breaking change
* Remove extra interface and methods
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
* CloudWatch: Add business logic layer for getting log groups (#642)
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Lattice: Fix - unset account id in region change handler (#646)
* move reset of account to region change handler
* fix broken test
* Lattice: Add account id to metric stat query deep link (#656)
add account id to metric stat link
* CloudWatch: Add new log groups handler for cross-account querying (#643)
* Lattice: Add feature tracking (#660)
* add tracking for account id prescense in metrics query
* also check feature toggle
* fix broken test
* CloudWatch: Add route for DescribeLogGroups for cross-account querying (#647)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
* Lattice: Handle account id default value (#662)
* make sure right type is returned
* set right default values
* Suggestions to lattice changes (#663)
* Change ListMetricsWithPageLimit response to slice of non-pointers
* Change GetAccountsForCurrentUserOrRole response to be not pointer
* Clean test Cleanup calls in test
* Remove CloudWatchAPI as part of mock
* Resolve conflicts
* Add Latest SDK (#672)
* add tooltip (#674)
* Docs: Add documentation for CloudWatch cross account querying (#676)
* wip docs
* change wordings
* add sections about metrics and logs
* change from monitoring to observability
* Update docs/sources/datasources/aws-cloudwatch/_index.md
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* apply pr feedback
* fix file name
* more pr feedback
* pr feedback
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* use latest version of the aws-sdk-go
* Fix tests' mock response type
* Remove change in Azure Monitor
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* Remove generic variables from publish github action
* Create publish aws cmd to automate aws releases
* Add tests to publish aws cmd
* Replace fmt with log for prints
* Remove unnecessary type assertions
* Readd mistakenly removed go package
* Replace log with fmt for prints due to conflicts
* Update github tests to conform with casing
* Get pluginmeta mostly moved over to pkg/plugins/plugindef
* Remove dead func
* Fix up pfs, use sync.Once in plugindef
* Update to latest thema
* Chase Endec->Codec conversion in Thema
* Comments on slash header gen; use ToSlash
* Also generate JSON schema for plugindef
* Generate JSON Schema as well
* Fix slot loading from kindsys cue decls
* Remove unused vars
* skip generating plugin.schema.json for now
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Update thema to latest
* Deal with s/Library/*Runtime/
* Commit new, working results of codegen
* We like pointers now
* Always take runtime arg for NewBase()
* Sketchy handwavy pass at entity meta framework
* Little nibbles
* Update pkg/framework/coremodel/entityframework.cue
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* Move file into new framework location
* Introduce loaders, Go code
* Complete rename to kind
* Flesh out framework, add svg/dashboard examples
* Cruft removal
* Remove generated kind go files from gitignore
* Refine maturity concept, add SlotKind
* Update embed and go deps
* Export PrefixWithGrafanaCUE
* Make the loader actually work, holy crap
* Many small tweaks to type.cue
* Add Apache 2 licensing exceptions for kinds
* Add new kinds dir, start of generator
* Roll back to earlier oapi-codegen
* Introduce new grafana-specific CUE loaders
* Introduce new tidy code generators framework
* Catch up kind framework with tinkering
* Add slices for the generators
* Add write/verify step to main generator
* Many renames
* Split up kind framework cue files
* Use kind.Decl within generated kinds
* Create kind.SomeDecl wrapper type to cache lineages
* Better names again
* Get one generated implemented, hopefully
* Copy dashboard schema into new kind.cue
* Small fixes to make the initial gen work
* Put svg kind in its new home
* Add generated Go dashboard type
* More renames and cleanups
* Add base kind registry and generator
* Stop blacklisting *_gen.go files
This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.
* Change codegen output directories
pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind
* Rename pkg/framework/kind to pkg/kindsys
* Add core structured kind generator
* Add plural and machine names to kind spec
* Copy playlist over to kind system
* Consolidate kindsys files
* Add raw kind generator
* Update CODEOWNERS for kind framework
* Touch up comments a bit
* More docs tweaks
* Remove generated types to reduce noise for review
* Split each generator into its own file
* Rename Slot kind to Composable kind
* Add handwavy types for customkind loading
* Guard against init calls to framework loader
* First pass at doc on extending the kind system
* Improve attribute example in docs
* Fix wire imports
* Add basic TS types generator
* Fix composable kind category def
* No need for a separate file with generate directive
* Catch dashboard schema up
* Rename generator types to something saner and generic
* Make version configurable in ts/go generators
* Add CommonMeta to ease property access
* Add kindsys prop indicating whether lineage is group
* Put all kind categories back in a single file
* Finish with kindsys group props
* Refactor maturity progression per discussion
- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now
* Convert ts veneer index generator to modular system
* Move over to new jennywrites framework
* Strip down old coremodel generator
* Use public version of jennywrites
* Pull latest thema
* Commit generated Go types
* Add header injection postprocessor
* Move sdboyer/jennywrites to grafana/codejen
* Tweak header output
* Remove dashboard and playlist coremodels
* Fix up backend dashboards devenv test
* Fix TS import patterns to new gen filename
* Update internal imports, remove coremodel registry
* Fix compilation errors, wire generation
* Export and replace the prefix dropper
* More Go struct and field name changes
* Last name fixes, hopefully
* Fix lint errors
* Last lint error
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* Chore: Update grafana-plugin-sdk-go to v0.142.0
* Update tests and golden files for 207 status code
* Chore: Move update flag definition at the top in response_parser_test.go
* retrigger
Co-authored-by: Will Browne <will.browne@grafana.com>
* Add phlare datasource
* Rename
* Add parca
* Add self field to parca
* Make sure phlare works with add to dashboard flow
* Add profiling category and hide behind feature flag
* Update description and logos
* Update phlare icon
* Cleanup logging
* Clean up logging
* Fix for shift+enter
* onRunQuery to set label
* Update type naming
* Fix lint
* Fix test and quality issues
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
* Add github release command to build/cmd
* Use go-github library and implement dry-run
* Make tag optional and default to metadata
* Fix minor bug with tag default
* Make some refactors to ease testing
* Add tests for publish github command
* Refactor publish github tests
* Refactor test helper function name
* Isolate local test
grafana.com/grafana/prometheus-alertmanager has been updated to a
version that fixes some bugs upstream. This change just updates that
dependency and a few shared ones.
* (WIP) switch to fork AM, first implementation of the API, generate spec
* get receivers avoiding race conditions
* use latest version of our forked AM, tests
* make linter happy, delete TODO comment
* update number of expected paths to += 2
* delete unused endpoint code, code review comments, tests
* Update pkg/services/ngalert/notifier/alertmanager.go
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
* remove call to fmt.Println
* clear naming for fields
* shorter variable names in GetReceivers
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
* Split all named types out into defs, etc.
* Use latest cuetsy, refactor generators accordingly
* Return AST type from plugin TS generator
* Near-complete checkin of TS veneer code generator
* First full completed pass
* Improve the attribute name
* Defer use of the dashboard veneer type to follow-up
* Remove dummy index, prettier on veneer
* Fix merge errors in gen.go
* Add match field to SpecialValueMap
* Fix backend lint errors
* metrics: Fix broken DBStats metrics
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* Register the sqlstats metrics by default
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* coremodels: Convert plugin-metadata schema to a coremodel
* Newer cuetsy; try quoting field name
* Add slot definitions
* Start sketching out pfs package
* Rerun codegen with fixes, new cuetsy
* Catch up dashboard with new cuetsy
* Update to go1.18
* Use new vmuxers in thema
* Add slot system in Go
* Draft finished implementation of pfs
* Collapse slot pkg into coremodel dir; add PluginInfo
* Add the mux type on top of kernel
* Refactor plugin generator for extensibility
* Change models.cue package, numerous debugs
* Bring new output to parity with old
* Remove old plugin generation logic
* Misc tweaking
* Reintroduce generation of shared schemas
* Drop back to go1.17
* Add globbing to tsconfig exclude
* Introduce pfs test on existing testdata
* Make most existing testdata tests pass with pfs
* coremodels: Convert plugin-metadata schema to a coremodel
* Newer cuetsy; try quoting field name
* Add APIType control concept, regen pluginmeta
* Use proper numeric types for schema fields
* Make pluginmeta schema follow Go type breakdown
* More decomposition into distinct types
* Add test case for no plugin.json file
* Fix missing ref to #Dependencies
* Remove generated TS for pluginmeta
* Update dependencies, rearrange go.mod
* Regenerate without Model prefix
* Use updated thema loader; this is now runnable
* Skip app plugin with weird include
* Make plugin tree extractor reusable
* Split out slot lineage load/validate logic
* Add myriad tests for new plugin validation failures
* Add test for zip fixtures
* One last run of codegen
* Proper delinting
* Ensure validation order is deterministic
* Let there actually be sorting
* Undo reliance on builtIn field (#54009)
* undo builtIn reliance
* fix tests
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Relocate dashboards test so it runs
* Cover newer schema versions in stripnulls
* Strip nulls and remove iteration fields
* Fix fiscalYearStartMonth bounds
* Fix up and format dashboard schema
* Update thema, tidy Go dependencies
* Change of sqlstore to use sqlx
* Use sqlx in the playlist store
* Refectory of the interface
* update playlist service
* go mod tidy
* some refectory on interface
* fix kyle