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

feat: add service name to context for propagation #31

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

pangdayuan1
Copy link
Collaborator

No description provided.

@mr3
Copy link
Contributor

mr3 commented Jun 12, 2024

The use of serialization and deserialization here is too costly and it is recommended to implement a simple deep copy of the TenantContext

public static TenantContext getCopyOfAll() {
    TenantContext tenantContext = LOCAL.get();
    if (tenantContext == null) {
      return null;
    }
    try {
      ObjectMapper objectMapper = new ObjectMapper();
      return objectMapper.readValue(objectMapper.writeValueAsString(tenantContext), TenantContext.class);
    } catch (Exception e) {
      LOGGER.error("Failed to get copy of all", e);
      return null;
    }
  }

@pangdayuan1 pangdayuan1 force-pushed the feat/serviceName branch 3 times, most recently from 6ab291d to b218cd0 Compare June 18, 2024 11:51
@pangdayuan1 pangdayuan1 changed the title feat: modify buried point name feat: add service name to context for propagation Jun 18, 2024
Copy link

sonarcloud bot commented Jun 18, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@pangdayuan1 pangdayuan1 merged commit 6276af6 into main Jun 18, 2024
5 checks passed
@pangdayuan1 pangdayuan1 deleted the feat/serviceName branch June 18, 2024 12:06
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.

3 participants