Interface AnalyticsEvent


@Deprecated public interface AnalyticsEvent
Deprecated.
The new API turned out to be impossible/impractical to use and is therefore deprecated. It will be removed in the future. Please use the old API instead: EventName Page listing problems with the new API: https://hello.atlassian.net/wiki/spaces/AB/pages/1097805011/Obstacles+to+wide+adoption+of+the+new+Analytics+API+by+the+products
This interface is compulsory if you want to use the newest api v2. The new api allows for deserializing nested objects and eradicates whitelist. Also it disallows Map which was the purpose of ACPLUG-56. To use this API just create a BEAN you want to publish and just execute: eventPublisher.publish(new RandomEvent()); That's it. No whitelist. Fire and forget. Disclaimer: extractor uses getters to extract field values - non-gettable public fields won't be included Quirks? If you want to publish strings you need to use special annotations, or they won't be included: Hashed or SecurityPermitted Please take the responsibility for the data you publish and consult with nearest COPS department. Some other exceptions exist. To understand in full how to use new API please see: - com.atlassian.analytics.client.extractor.nested.FieldExtractorTest for unit tests for extraction - com.atlassian.analytics.client.pipeline.TestAnnotableAnalyticPipeline for integration tests of whole event pipeline
Since:
6.2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default Optional<String>
    Deprecated.
    When returns empty, then com.atlassian.analytics.client.pipeline.serialize.properties.extractors.v2.NewMetaExtractor#getEventName(Object) will genenerate snake-cased version of class simple name without trailing event.
  • Method Details

    • getEventName

      default Optional<String> getEventName()
      Deprecated.
      When returns empty, then com.atlassian.analytics.client.pipeline.serialize.properties.extractors.v2.NewMetaExtractor#getEventName(Object) will genenerate snake-cased version of class simple name without trailing event. e.g. ThisIsAnEvent to this-is-an Check this test case for example: com.atlassian.analytics.client.pipeline.TestAnnotableAnalyticPipeline#givenNotDefinedEventNameShouldExtractEventNameFromClassName()
      Returns:
      generated event name