Skip to content

Commit e02ba84

Browse files
authored
Rename to Amazon Managed Service for Prometheus Data Source (#179)
1 parent 9ca57e6 commit e02ba84

17 files changed

+47
-42
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.3.0
4+
- Rename plugin & repo
5+
36
## 0.2.0 (Private release for testing)
47
- Initial private release of the Amazon Managed Prometheus plugin, a wrapper around [the core Prometheus datasource](https://grafana.com/docs/grafana/latest/datasources/prometheus/) that uses Amazon-specific authentication.
58

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Prometheus Amazon Data Source
1+
# Amazon Managed Service for Prometheus Data Source
22

3-
This data source plugin is is for Amazon Prometheus. It has all the features of the Grafana core Prometheus plugin with Amazon specific authentication in the configuration page.
3+
This data source plugin is for the Amazon Managed Service for Prometheus. It has all the features of the Grafana core Prometheus plugin with Amazon specific authentication in the configuration page.
44

55
Amazon Managed Service for Prometheus is a Prometheus-compatible service that monitors and provides alerts on containerized applications and infrastructure at scale.
66

cspell.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"grafana",
3333
"datasource",
3434
"datasources",
35-
"prometheusamazon",
35+
"amazonprometheus",
3636
"tsdb",
3737
"promlib",
3838
"instancemgmt",

docker-compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
1414
grafana:
1515
user: root
16-
container_name: 'grafana-prometheusamazon-datasource'
16+
container_name: 'grafana-amazonprometheus-datasource'
1717
platform: linux/amd64
1818

1919
depends_on:
@@ -36,6 +36,6 @@ services:
3636
cap_add:
3737
- SYS_PTRACE
3838
volumes:
39-
- ./dist:/var/lib/grafana/plugins/grafana-prometheusamazon-datasource
39+
- ./dist:/var/lib/grafana/plugins/grafana-amazonprometheus-datasource
4040
- ./provisioning:/etc/grafana/provisioning
41-
- .:/root/grafana-prometheusamazon-datasource
41+
- .:/root/grafana-amazonprometheus-datasource

e2e/annotation-editor.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.describe('Prometheus annotation query editor', () => {
1515

1616
await page.getByTestId('data-testid Select a data source').fill(ds.name);
1717

18-
await page.getByRole('button', { name: `${ds.name} Prometheus` }).click();
18+
await page.getByRole('button', { name: `${ds.name}` }).click();
1919

2020
await expect(annotationEditPage
2121
.getByGrafanaSelector(selectors.components.DataSource.Prometheus.queryEditor.code.queryField)).toBeVisible();

e2e/configuration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ test.describe('Configuration tests', () => {
108108
page,
109109
}) => {
110110
const configPage = await createDataSourceConfigPage({
111-
type: "grafana-prometheusamazon-datasource",
111+
type: "grafana-amazonprometheus-datasource",
112112
name: DATA_SOURCE_NAME,
113113
});
114114

@@ -136,7 +136,7 @@ test.describe('Configuration tests', () => {
136136
page,
137137
}) => {
138138
const configPage = await createDataSourceConfigPage({
139-
type: "grafana-prometheusamazon-datasource",
139+
type: "grafana-amazonprometheus-datasource",
140140
name: DATA_SOURCE_NAME + "check",
141141
});
142142

e2e/query-editor.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ test.describe('Prometheus query editor', () => {
196196

197197
await page.getByTestId('data-testid Select a data source').click();
198198

199-
await page.getByTestId('data-testid Select a data source').fill('Prometheus-amazon');
199+
await page.getByTestId('data-testid Select a data source').fill('Amazon Managed Service for Prometheus');
200200

201-
await page.getByRole('button', { name: 'Prometheus-amazon Prometheus' }).click();
201+
await page.getByRole('button', { name: 'Amazon Managed Service for Prometheus' }).click();
202202

203203
await explorePage
204204
.getByGrafanaSelector(selectors.components.DataSource.Prometheus.queryEditor.builder.metricSelect).isVisible();
@@ -226,9 +226,9 @@ test.describe('Prometheus query editor', () => {
226226

227227
await page.getByTestId('data-testid Select a data source').click();
228228

229-
await page.getByTestId('data-testid Select a data source').fill('Prometheus-amazon');
229+
await page.getByTestId('data-testid Select a data source').fill('Amazon Managed Service for Prometheus');
230230

231-
await page.getByRole('button', { name: 'Prometheus-amazon Prometheus' }).click();
231+
await page.getByRole('button', { name: 'Amazon Managed Service for Prometheus' }).click();
232232

233233
await explorePage
234234
.getByGrafanaSelector(selectors.components.DataSource.Prometheus.queryEditor.builder.metricSelect).isEnabled();
@@ -271,9 +271,9 @@ test.describe('Prometheus query editor', () => {
271271

272272
await page.getByTestId('data-testid Select a data source').click();
273273

274-
await page.getByTestId('data-testid Select a data source').fill('Prometheus-amazon');
274+
await page.getByTestId('data-testid Select a data source').fill('Amazon Managed Service for Prometheus');
275275

276-
await page.getByRole('button', { name: 'Prometheus-amazon Prometheus' }).click();
276+
await page.getByRole('button', { name: 'Amazon Managed Service for Prometheus' }).click();
277277

278278
await explorePage
279279
.getByGrafanaSelector(selectors.components.DataSource.Prometheus.queryEditor.builder.metricSelect).isVisible();
@@ -306,9 +306,9 @@ test.describe('Prometheus query editor', () => {
306306

307307
await page.getByTestId('data-testid Select a data source').click();
308308

309-
await page.getByTestId('data-testid Select a data source').fill('Prometheus-amazon');
309+
await page.getByTestId('data-testid Select a data source').fill('Amazon Managed Service for Prometheus');
310310

311-
await page.getByRole('button', { name: 'Prometheus-amazon Prometheus' }).click();
311+
await page.getByRole('button', { name: 'Amazon Managed Service for Prometheus' }).click();
312312

313313
await explorePage
314314
.getByGrafanaSelector(selectors.components.QueryBuilder.labelSelect).isVisible();
@@ -343,9 +343,9 @@ test.describe('Prometheus query editor', () => {
343343

344344
await page.getByTestId('data-testid Select a data source').click();
345345

346-
await page.getByTestId('data-testid Select a data source').fill('Prometheus-amazon');
346+
await page.getByTestId('data-testid Select a data source').fill('Amazon Managed Service for Prometheus');
347347

348-
await page.getByRole('button', { name: 'Prometheus-amazon Prometheus' }).click();
348+
await page.getByRole('button', { name: 'Amazon Managed Service for Prometheus' }).click();
349349

350350
await explorePage
351351
.getByGrafanaSelector(selectors.components.DataSource.Prometheus.queryEditor.builder.metricSelect).isVisible();

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/grafana/prometheus-amazon
1+
module github.com/grafana/grafana-amazonprometheus-datasource
22

33
go 1.22.4
44

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "grafana-prometheusamazon-datasource",
3-
"version": "0.2.0",
2+
"name": "grafana-amazonprometheus-datasource",
3+
"version": "0.3.0",
44
"description": "A plugin for Amazon Managed Prometheus",
55
"scripts": {
66
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",

pkg/datasource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
func NewDatasource(ctx context.Context, dsInstanceSettings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error) {
16-
plog := backend.NewLoggerWith("logger", "tsdb.prometheus-amazon")
16+
plog := backend.NewLoggerWith("logger", "tsdb.amazon-prometheus")
1717
plog.Debug("Initializing")
1818

1919
authSettings, _ := awsds.ReadAuthSettingsFromContext(ctx)

pkg/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616
// from Grafana to create different instances of SampleDatasource (per datasource
1717
// ID). When datasource configuration changed Dispose method will be called and
1818
// new datasource instance created using NewSampleDatasource factory.
19-
if err := datasource.Manage("grafana-prometheusamazon-datasource", NewDatasource, datasource.ManageOpts{}); err != nil {
19+
if err := datasource.Manage("grafana-amazonprometheus-datasource", NewDatasource, datasource.ManageOpts{}); err != nil {
2020
log.DefaultLogger.Error(err.Error())
2121
os.Exit(1)
2222
}

provisioning/dashboards/e2e-dashboard.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
},
1616
{
1717
"datasource": {
18-
"type": "grafana-prometheusamazon-datasource",
19-
"uid": "grafana-prometheusamazon"
18+
"type": "grafana-amazonprometheus-datasource",
19+
"uid": "grafana-amazonprometheus"
2020
},
2121
"enable": true,
2222
"expr": "go_goroutines",
@@ -38,8 +38,8 @@
3838
"panels": [
3939
{
4040
"datasource": {
41-
"type": "grafana-prometheusamazon-datasource",
42-
"uid": "grafana-prometheusamazon"
41+
"type": "grafana-amazonprometheus-datasource",
42+
"uid": "grafana-amazonprometheus"
4343
},
4444
"fieldConfig": {
4545
"defaults": {
@@ -119,7 +119,7 @@
119119
{
120120
"datasource": {
121121
"type": "prometheus",
122-
"uid": "grafana-prometheusamazon"
122+
"uid": "grafana-amazonprometheus"
123123
},
124124
"disableTextWrap": false,
125125
"editorMode": "builder",
@@ -149,8 +149,8 @@
149149
"value": "__name__"
150150
},
151151
"datasource": {
152-
"type": "grafana-prometheusamazon-datasource",
153-
"uid": "grafana-prometheusamazon"
152+
"type": "grafana-amazonprometheus-datasource",
153+
"uid": "grafana-amazonprometheus"
154154
},
155155
"definition": "label_names()",
156156
"hide": 0,
@@ -178,7 +178,7 @@
178178
"timeRangeUpdatedDuringEditOrView": false,
179179
"timepicker": {},
180180
"timezone": "browser",
181-
"title": "grafana-prometheusamazon",
181+
"title": "grafana-amazonprometheus",
182182
"uid": "fdewz0hu7qccge",
183183
"version": 2,
184184
"weekStart": ""

provisioning/datasources/code-editor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: 1
33
datasources:
44
- name: a-prometheus-code-editor
55
uid: a-prometheus-code-editor
6-
type: grafana-prometheusamazon-datasource
6+
type: grafana-amazonprometheus-datasource
77
url: http://prometheus:9090
88
access: proxy
99
editable: true

provisioning/datasources/datasources.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apiVersion: 1
22

33
datasources:
4-
- name: Prometheus-amazon
5-
uid: grafana-prometheusamazon
6-
type: grafana-prometheusamazon-datasource
4+
- name: Amazon Managed Service for Prometheus
5+
uid: grafana-amazonprometheus
6+
type: grafana-amazonprometheus-datasource
77
url: http://prometheus:9090
88
access: proxy
99
editable: true

src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Prometheus Amazon Data Source
1+
# Amazon Managed Service for Prometheus Data Source
22

33
Amazon Managed Service for Prometheus is a Prometheus-compatible service that monitors and provides alerts on containerized applications and infrastructure at scale.
44

src/configuration/ConfigEditor.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ export const ConfigEditor = (props: Props) => {
2222
<>
2323
{options.access === 'direct' && (
2424
<Alert title="Error" severity="error">
25-
Browser access mode in the Prometheus data source is no longer available. Switch to server access mode.
25+
Browser access mode in the Amazon Managed Service for Prometheus data source is no longer available. Switch to server access mode.
2626
</Alert>
2727
)}
2828
<DataSourceDescription
29-
dataSourceName="Prometheus"
29+
dataSourceName="Amazon Managed Service for Prometheus"
30+
// TODO: point this at the new plugin's docs or README }
3031
docsLink="https://grafana.com/docs/grafana/latest/datasources/prometheus/configure-prometheus-data-source/"
3132
/>
3233
<hr className={`${styles.hrTopSpace} ${styles.hrBottomSpace}`} />
@@ -60,6 +61,7 @@ export const ConfigEditor = (props: Props) => {
6061
* @returns
6162
*/
6263
export function docsTip(url?: string) {
64+
/* TODO: point this at the new plugin's docs or README */
6365
const docsUrl = 'https://grafana.com/docs/grafana/latest/datasources/prometheus/#configure-the-data-source';
6466

6567
return (

src/plugin.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"category": "tsdb",
33
"$schema": "https://raw.githubusercontent.com/grafana/grafana/main/docs/sources/developers/plugins/plugin.schema.json",
44
"type": "datasource",
5-
"name": "Prometheus Amazon",
6-
"id": "grafana-prometheusamazon-datasource",
7-
"executable": "gpx_prometheus_amazon",
5+
"name": "Amazon Managed Service for Prometheus",
6+
"id": "grafana-amazonprometheus-datasource",
7+
"executable": "gpx_amazonprometheus",
88
"routes": [
99
{
1010
"method": "POST",

0 commit comments

Comments
 (0)