Skip to content

Conversation

@mariaalons
Copy link

@mariaalons mariaalons commented Dec 19, 2025

Adds a README with the required configuration for Alloy

Adds Overview dashboard for pinecone:

With Overview:
Screenshot 2025-12-19 at 10 13 40

Operations:
Screenshot 2025-12-19 at 10 20 50

Screenshot 2025-12-19 at 10 24 25

Copy link
Member

@Dasomeone Dasomeone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start, thank you @mariaalons ! I left a bunch of feedback and suggestions, but it's looking very good already, most of what I left are smaller nits


// Filtering and labels
filteringSelector: 'job=~"prometheus.scrape.pinecone_metrics"',
groupLabels: [], // Options: ['cloud'], ['region'], ['cloud', 'region'], or [] for single cloud/region
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a sensible default here. Are cloud and region not present if it's a single cloud/region?
If they're present we should use them by default

// Filtering and labels
filteringSelector: 'job=~"prometheus.scrape.pinecone_metrics"',
groupLabels: [], // Options: ['cloud'], ['region'], ['cloud', 'region'], or [] for single cloud/region
instanceLabels: ['index_name'], // Each index is an instance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate here on what an instance represents? Or maybe not here, but in the readme?

this.signals.operations.getVariablesMultiChoice()
)
+ g.dashboard.withPanels(
g.util.grid.wrapPanels(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation issue here, and could you wrap wrapPanels in resolveCollapsedFlagOnRow as well to account for any future collapsed rows we may have?

sources: {
prometheus: {
expr: 'sum(pinecone_db_record_total{%(queriesSelector)s})',
legendCustomTemplate: 'Total records',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing, but no need for duplicate mention of "Total" here or throughout the signals when it's already mentioned in the title & description, just Records is fine

Comment on lines 31 to 32
g.panel.timeSeries.new('Read vs Write Operations')
+ commonlib.panels.generic.timeSeries.base.stylize()
Copy link
Member

@Dasomeone Dasomeone Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't instantiate g.panel.<any>.new directly unless required. You can instead invoke via commonlib.panels.generic.timeSeries.base.new()

Comment on lines +49 to +93
indexesTable:
commonlib.panels.generic.table.base.new(
'Indexes Overview',
targets=[
signals.recordTotal.asTableTarget(),
signals.storageSizeBytes.asTableTarget(),
],
description='Overview of all indexes showing total records and storage size per index.',
)
+ g.panel.table.queryOptions.withTransformations([
// Filter to include only needed columns
g.panel.table.queryOptions.transformation.withId('filterFieldsByName')
+ g.panel.table.queryOptions.transformation.withOptions({
include: {
names: [
'index_name',
'instance',
'Value #Total records',
'Value #Storage size',
],
},
}),
// Merge the two queries
g.panel.table.queryOptions.transformation.withId('merge')
+ g.panel.table.queryOptions.transformation.withOptions({}),
// Organize and rename columns
g.panel.table.queryOptions.transformation.withId('organize')
+ g.panel.table.queryOptions.transformation.withOptions({
excludeByName: {},
indexByName: {},
renameByName: {
index_name: 'Index Name',
instance: 'Instance',
'Value #Total records': 'Total Records',
'Value #Storage size': 'Storage Size',
},
includeByName: {},
}),
])
+ g.panel.table.standardOptions.withOverridesMixin([
// Configure Total Records column
g.panel.table.fieldOverride.byName.new('Total Records')
+ g.panel.table.fieldOverride.byName.withPropertiesFromOptions(
g.panel.table.standardOptions.withUnit('short')
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, well done!

As an aside, this is one of the places I think we have a lot to improve on the common-lib, would be great if we could make a simpler API for some of this, e.g. automatic renaming of Value # namings

signals.upsertDuration.asTimeSeries()
+ commonlib.panels.generic.timeSeries.base.stylize()
+ g.panel.timeSeries.standardOptions.withUnit('ms')
+ g.panel.timeSeries.standardOptions.color.withMode('continuous-BlPu')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should have a look at the new tokenization of styles, it's very new but may be a good opportunity to try it out, e.g. instead of manually specifying you'd give a design token (example, not 1:1 match): tokens.panels.timeSeries.lines.gradientMode.default

Tokens are defined here https://github.com/grafana/jsonnet-libs/tree/master/common-lib/common/tokens

mariaalons and others added 5 commits December 19, 2025 14:45
Co-authored-by: Emily <1282515+Dasomeone@users.noreply.github.com>
Co-authored-by: Emily <1282515+Dasomeone@users.noreply.github.com>
Co-authored-by: Emily <1282515+Dasomeone@users.noreply.github.com>
Co-authored-by: Emily <1282515+Dasomeone@users.noreply.github.com>
- Add job template variable via groupLabels
- Update filteringSelector to use the $job variable
- Include instance in instanceLabels for instance variable
- Set panel datasource to use template variables instead of mixed datasource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants