
io.honeycomb.libhoney.transport.batch.impl.HoneycombBatchKeyStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libhoney-java Show documentation
Show all versions of libhoney-java Show documentation
The Java client for sending events honeycomb
The newest version!
package io.honeycomb.libhoney.transport.batch.impl;
import io.honeycomb.libhoney.eventdata.ResolvedEvent;
import io.honeycomb.libhoney.transport.batch.BatchKeyStrategy;
/**
* Key strategy operating on {@link ResolvedEvent}, returning a key that allows batching as described in the
* SDK Spec#transmission:
* "the library must separate events into batches that all have API Host, writekey, and dataset in common".
*/
public class HoneycombBatchKeyStrategy implements BatchKeyStrategy {
/**
* @param event to use for deducing the key.
* @return A string key to determine what batch this event goes into.
*/
@Override
public String getKey(final ResolvedEvent event) {
return event.getApiHost() + ";" + event.getWriteKey() + ";" + event.getDataset();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy