Skip to content

one PullStackFromRregistry call creates 3 events in telemetry #933

@kadel

Description

@kadel

/kind bug

Which area this bug is related to?

/area library
/area registry

What versions of software are you using?

registry library version 36887a7907aa

Bug Summary

Using PullStackFromRregistry function from github.com/devfile/registry-support/registry-library/library to pull devfiles from the registry creates 3 events (two download devfile and one list devfile) in the telemetry.

package main

import (
	"github.com/devfile/registry-support/registry-library/library"
)

func main() {
	td := library.TelemetryData{
		Client: "test-staging",
	}
	opts := library.RegistryOptions{
		Telemetry: td,
	}
	library.PullStackFromRegistry("https://registry.devfile.io", "nodejs-vue", ".", opts)
}

events recorded when the above call executed

client.Track(&analytics.Track{
  UserId: "test-staging",
  Event: "list devfile",
  Properties: map[string]interface{}{
    "client": "test-staging",
    "registry": "devfile-community-registry",
    "type": "stack",
  },
})
client.Track(&analytics.Track{
  UserId: "test-staging",
  Event: "download devfile",
  Properties: map[string]interface{}{
    "client": "test-staging",
    "name": "nodejs-vue",
    "registry": "devfile-community-registry",
  },
})
client.Track(&analytics.Track{
  UserId: "test-staging",
  Event: "download devfile",
  Properties: map[string]interface{}{
    "client": "test-staging",
    "name": "nodejs-vue",
    "registry": "devfile-community-registry",
  },
})

Expected behavior

I would expect that calling PullStackFromRegistry creates just one download devfile event and nothing else

Target Date: 2022-11-04

Metadata

Metadata

Assignees

Labels

area/libraryCommon devfile library for interacting with devfilesarea/registryDevfile registry for stacks and infrastructurearea/telemetrytelemetry related issueskind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions