As per this comment from the proto, we cannot create spans with duplicate names. To make this check, we need to store the spans we receive in memory. This PR implements this by using a map of {spanName: span} in order to check for duplicates and also allow retrieval of spans by name in O(1) time .
This will also bridge into future PRs where we provide some additional custom RPCs for testing purposes, where we allow users to retrieve the data that they've exported (for example, retrieving how many spans have been created, etc.)
As per this comment from the proto, we cannot create spans with duplicate names. To make this check, we need to store the spans we receive in memory. This PR implements this by using a map of
{spanName: span}
in order to check for duplicates and also allow retrieval of spans by name in O(1) time .This will also bridge into future PRs where we provide some additional custom RPCs for testing purposes, where we allow users to retrieve the data that they've exported (for example, retrieving how many spans have been created, etc.)