Skip to content

Conversation

@Peeja
Copy link
Member

@Peeja Peeja commented Dec 19, 2025

PR Dependency Tree

This tree was auto-generated by Charcoal

Copy link
Member

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

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

a couple renames I'd like to maintain consistency.

also, do we need to make the guppy client did an attribute on each of these -- otherwise I think we'll just get a mega counter for all guppy instances?

// doWork
func() error {
err := api.AddShardsForUpload(ctx, uploadID, spaceDID, func(shard *blobsmodel.Shard) error {
shardAddedCtr.Add(ctx, 1)
Copy link
Member

Choose a reason for hiding this comment

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

Let's rename these to use uploaded rather than added, to mantain consistency (should probably rename AddShardsForUpload to UploadShardsForUpload)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah…I've been trying to avoid calling what we do with shards "uploading" since the whole process is an upload, but I think that may be a losing battle.

// doWork
func() error {
err := api.AddIndexesForUpload(ctx, uploadID, spaceDID, func(index *blobsmodel.Index) error {
indexAddedCtr.Add(ctx, 1)
Copy link
Member

Choose a reason for hiding this comment

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

same as above

Comment on lines 55 to 60
res, err := resource.New(ctx,
resource.WithAttributes(
attribute.String("service.name", "guppy"),
attribute.String("service.version", "0.0.0"),
),
)
Copy link
Member

Choose a reason for hiding this comment

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

@Peeja here is where you are going to want to add attributes, these will be applied to every metric and trace sent by guppy. At a minimum I would recommend:

  • Proper Version
  • Network (warm-staging, forge-prod, etc)
  • An instanceID - the DID is ideal for this

Here is an example of how we do it in Piri: https://github.com/storacha/piri/blob/main/lib/telemetry/telemetry.go#L46

"github.com/storacha/guppy/pkg/preparation/uploads"
)

const name = "preparation/storacha"
Copy link
Member

Choose a reason for hiding this comment

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

iirc otel recommends these be full package names: github.com/storacha/guppy/..., though I might be misremembering.

Copy link
Member

@frrist frrist left a comment

Choose a reason for hiding this comment

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

In the longer term I don't know how cardinality will play out here, but you may want to associate each upload counter with a space attribute.

@Peeja
Copy link
Member Author

Peeja commented Dec 19, 2025

Yeah, my understanding use that limited cardinality in the short term (not many uploads happening very often) and unbounded cardinality in the long run is fine, so we should be good for a bit, and probably forever if it's opt-in.

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.

4 participants