Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding telemetry #144

Merged
merged 3 commits into from
Dec 13, 2024
Merged

Adding telemetry #144

merged 3 commits into from
Dec 13, 2024

Conversation

jonathanlurie
Copy link
Contributor

@jonathanlurie jonathanlurie commented Dec 9, 2024

RD-452
RD-454
RD-455

From each module, the Telemetry feature should be used as such:

import packagejson from "../package.json";


map.telemetry.registerModule(packagejson.name, packagejson.version);

@sebstryczek
Copy link
Contributor

So far so good, I am starting adding registration to modules

src/Telemetry.ts Outdated
Comment on lines 39 to 41
registerModule(name: string, version: string) {
this.registeredModules.push({ name, version });
}
Copy link
Contributor

@sebstryczek sebstryczek Dec 10, 2024

Choose a reason for hiding this comment

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

So I wonder about registration from CustomLayer.
The map instance is available in onAdd method, so it will be called for each instance of the layer.
We can make run it only once but then it won't be called for multiple maps.

So we have two options:

  1. Saving registered map ids and check if it was already registered.
  2. Check here, if the module was already registered.

wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! As discussed, I think this should not be dealt with by modules but rather internally in the SDK. So I'll just add this logic of avoiding duplicates while still being able to spot if a project is using two different versions of a plugin.
Good catch!

@jonathanlurie jonathanlurie marked this pull request as ready for review December 12, 2024 13:54
@jonathanlurie jonathanlurie merged commit d9f12f1 into RD-369 Dec 13, 2024
1 check passed
@jonathanlurie jonathanlurie deleted the telemetry branch December 13, 2024 08:31
sebstryczek added a commit that referenced this pull request Jan 6, 2025
* Replace transform calls by map calls

* Some fix for globe compatibility

* Adding projection control and map instance logic (#132)

* adding the projection control

* wip

* fixed the projection control animation

* Map class now has a better projection management

* Projection control is now using the Map methods

* linting

* Projection documentation

* isGlobeprojection to isGlobeProjection

* udpate readme with new FOV built-in function

* update maplibre

* release canditate version number

* update to ML v5 pre 7 and newer Client lib

* update to maplibre 5.0.0-pre.8

* RD-369_maplibre-pre9 (#145)

* Update maplibre to 5.0.0.pre9

* Add globe examples

* Adding telemetry (#144)

* Adding telemetry

* update telemetry endpoint

* now using a Set

* Bump version

* RD-492_maplibre-v5.0.0-pre10 (#149)

* Update code for using maplibre v5.0.0-pre10

* Update examples

* Bump version

* v3.0.0_RD-401_maplibre-v5.0.0 (#150)

* Update dependencies

* Update demos

* Update changelog

* Make biome happy

* Improve development experience (fix dev mode)

* Update icons

* Split vite config files

---------

Co-authored-by: Jonathan Lurie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants